Accept theme objects

This commit is contained in:
Ionică Bizău 2015-07-13 08:23:24 +03:00
parent 53366e8794
commit 6965300e5b

View file

@ -160,8 +160,10 @@ 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 (!/^DARK|LIGHT$/.test(options.theme)) { if (typeof GitStats.config.theme === "string") {
options.theme = null; if (!/^DARK|LIGHT$/.test(options.theme)) {
options.theme = null;
}
} }
} else { } else {
options.theme = noAnsiOpt.is_provided ? null options.theme = noAnsiOpt.is_provided ? null