More defensive handling of pluginInfo

print-window-tiddler
Jermolene 2014-03-31 18:30:45 +01:00
rodzic c3e24c1228
commit 53ca7f6a2f
1 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -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})
};
}
});
}
});
};