mirror of
				https://github.com/Jermolene/TiddlyWiki5
				synced 2025-10-30 23:23:02 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -33,12 +33,6 @@ function ThemeManager(wiki) { | |||||||
| ThemeManager.prototype.switchTheme = function() { | ThemeManager.prototype.switchTheme = function() { | ||||||
| 	// Get the name of the current theme | 	// Get the name of the current theme | ||||||
| 	var themePluginTitle = this.wiki.getTiddlerText(THEME_PLUGIN_TITLE,DEFAULT_THEME_PLUGIN); | 	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 | 	// Accumulate the titles of the plugins that we need to load | ||||||
| 	var themePlugins = [], | 	var themePlugins = [], | ||||||
| 		self = this, | 		self = this, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jeremy Ruston
					Jeremy Ruston