1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Fix crash with "fields" filter operator applied to missing tiddlers

Fixes #132
This commit is contained in:
Jeremy Ruston 2013-08-21 22:33:04 +01:00
parent 6b70b0bf7c
commit 5fe2d718e0

View File

@ -22,8 +22,10 @@ exports.fields = function(source,operator,options) {
function checkTiddler(title) {
// Return the fields on the specified tiddler
var tiddler = options.wiki.getTiddler(title);
for(var fieldName in tiddler.fields) {
$tw.utils.pushTop(results,fieldName);
if(tiddler) {
for(var fieldName in tiddler.fields) {
$tw.utils.pushTop(results,fieldName);
}
}
}
// Iterate through the source tiddlers