mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
fix for broken plugin tiddlers that do not contain a tiddlers field;
avoids runtime errors upstream when accessing subtiddlers inside a (broken) tiddler and when using the plugintiddlers filter operator.
This commit is contained in:
parent
eacb9e53eb
commit
b1fb0a2a07
@ -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