From 6965300e5b6816726fc57985d995e55a8b816ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionic=C4=83=20Biz=C4=83u?= Date: Mon, 13 Jul 2015 08:23:24 +0300 Subject: [PATCH] Accept theme objects --- bin/git-stats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/git-stats b/bin/git-stats index f564443..5e60d4d 100755 --- a/bin/git-stats +++ b/bin/git-stats @@ -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