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

Fixes #132
print-window-tiddler
Jeremy Ruston 2013-08-21 22:33:04 +01:00
rodzic 6b70b0bf7c
commit 5fe2d718e0
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -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