From 53ca7f6a2fce94c24f06e6f290641902d624df05 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 31 Mar 2014 18:30:45 +0100 Subject: [PATCH] More defensive handling of pluginInfo --- boot/boot.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index b25c639a6..e4a814d8f 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -964,15 +964,17 @@ $tw.Wiki = function(options) { shadowTiddlers = {}; $tw.utils.each(pluginTiddlers,function(tiddler) { // Extract the constituent tiddlers - $tw.utils.each(pluginInfo[tiddler.fields.title].tiddlers,function(constituentTiddler,constituentTitle) { - // Save the tiddler object - if(constituentTitle) { - shadowTiddlers[constituentTitle] = { - source: tiddler.fields.title, - tiddler: new $tw.Tiddler(constituentTiddler,{title: constituentTitle}) - }; - } - }); + if($tw.utils.hop(pluginInfo,tiddler.fields.title)) { + $tw.utils.each(pluginInfo[tiddler.fields.title].tiddlers,function(constituentTiddler,constituentTitle) { + // Save the tiddler object + if(constituentTitle) { + shadowTiddlers[constituentTitle] = { + source: tiddler.fields.title, + tiddler: new $tw.Tiddler(constituentTiddler,{title: constituentTitle}) + }; + } + }); + } }); };