From f43e22f8e59eb2be7071a805263e1ad5459b1478 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 10 May 2013 20:24:40 +0100 Subject: [PATCH] Remove early bail on switching to a non-existent theme Fixes #98 The excised code was unnecessary, as the rest of the function operates correctly even if the theme tiddler is missing --- core/modules/themes.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/modules/themes.js b/core/modules/themes.js index 3059c1214..e9400ecba 100644 --- a/core/modules/themes.js +++ b/core/modules/themes.js @@ -33,12 +33,6 @@ function ThemeManager(wiki) { ThemeManager.prototype.switchTheme = function() { // Get the name of the current theme var themePluginTitle = this.wiki.getTiddlerText(THEME_PLUGIN_TITLE,DEFAULT_THEME_PLUGIN); - // Get the theme plugin - var themePluginTiddler = this.wiki.getTiddler(themePluginTitle); - // Complain if we don't have a theme - if(!themePluginTiddler || !themePluginTiddler.isPlugin()) { - return $tw.utils.error("Cannot load theme " + themePluginTitle); - } // Accumulate the titles of the plugins that we need to load var themePlugins = [], self = this,