Accept theme objects

This commit is contained in:
Ionică Bizău 2015-07-13 08:23:24 +03:00
parent 53366e8794
commit 6965300e5b
1 changed files with 4 additions and 2 deletions

View File

@ -160,8 +160,10 @@ if (!authorsOpt.is_provided || globalActivityOpt.is_provided) {
// This can be a string or an object
if (/^object|string$/.test(Typpy(GitStats.config.theme))) {
options.theme = GitStats.config.theme;
if (!/^DARK|LIGHT$/.test(options.theme)) {
options.theme = null;
if (typeof GitStats.config.theme === "string") {
if (!/^DARK|LIGHT$/.test(options.theme)) {
options.theme = null;
}
}
} else {
options.theme = noAnsiOpt.is_provided ? null