mirror of
https://github.com/IonicaBizau/git-stats.git
synced 2024-12-22 21:32:10 +01:00
Accept theme objects
This commit is contained in:
parent
53366e8794
commit
6965300e5b
1 changed files with 4 additions and 2 deletions
|
@ -160,9 +160,11 @@ if (!authorsOpt.is_provided || globalActivityOpt.is_provided) {
|
||||||
// This can be a string or an object
|
// This can be a string or an object
|
||||||
if (/^object|string$/.test(Typpy(GitStats.config.theme))) {
|
if (/^object|string$/.test(Typpy(GitStats.config.theme))) {
|
||||||
options.theme = GitStats.config.theme;
|
options.theme = GitStats.config.theme;
|
||||||
|
if (typeof GitStats.config.theme === "string") {
|
||||||
if (!/^DARK|LIGHT$/.test(options.theme)) {
|
if (!/^DARK|LIGHT$/.test(options.theme)) {
|
||||||
options.theme = null;
|
options.theme = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
options.theme = noAnsiOpt.is_provided ? null
|
options.theme = noAnsiOpt.is_provided ? null
|
||||||
: lightOpt.is_provided ? "LIGHT": "DARK"
|
: lightOpt.is_provided ? "LIGHT": "DARK"
|
||||||
|
|
Loading…
Reference in a new issue