mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-18 07:44:51 +00:00
Merge pull request #914 from TheDiveO/master
Avoid runtime errors in presence of broken plugin tiddlers
This commit is contained in:
commit
9dff0c4b12
@ -19,7 +19,7 @@ exports.plugintiddlers = function(source,operator,options) {
|
||||
var results = [];
|
||||
source(function(tiddler,title) {
|
||||
var pluginInfo = options.wiki.getPluginInfo(title) || options.wiki.getTiddlerData(title,{tiddlers:[]});
|
||||
if(pluginInfo) {
|
||||
if(pluginInfo && pluginInfo.tiddlers) {
|
||||
$tw.utils.each(pluginInfo.tiddlers,function(fields,title) {
|
||||
results.push(title);
|
||||
});
|
||||
|
@ -570,7 +570,7 @@ exports.sortByList = function(array,listTitle) {
|
||||
|
||||
exports.getSubTiddler = function(title,subTiddlerTitle) {
|
||||
var bundleInfo = this.getPluginInfo(title) || this.getTiddlerData(title);
|
||||
if(bundleInfo) {
|
||||
if(bundleInfo && bundleInfo.tiddlers) {
|
||||
var subTiddler = bundleInfo.tiddlers[subTiddlerTitle];
|
||||
if(subTiddler) {
|
||||
return new $tw.Tiddler(subTiddler);
|
||||
|
Loading…
Reference in New Issue
Block a user