From 4420c3b2af9c826fa3db3de4949e201e14988260 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Tue, 30 Aug 2016 11:58:21 -0700 Subject: [PATCH] Make Site#configure_theme more understandable --- lib/jekyll/site.rb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 02110f97..91f58e3a 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -423,15 +423,14 @@ module Jekyll private def configure_theme - self.theme = nil - return unless config["theme"] - - if config["theme"].is_a?(String) - self.theme = Jekyll::Theme.new(config["theme"]) - else - Jekyll.logger.warn "Theme:", - "value of 'theme' in config should be String, but got #{config["theme"].class}" - end + self.theme = + if config["theme"].is_a?(String) + Jekyll::Theme.new(config["theme"]) + else + Jekyll.logger.warn "Theme:", "value of 'theme' in config should be " + "String to use gem-based themes, but got #{config["theme"].class}" + nil + end end private