diff --git a/core/modules/filters/field.js b/core/modules/filters/field.js index 949cb217e..f85df5c0d 100644 --- a/core/modules/filters/field.js +++ b/core/modules/filters/field.js @@ -26,6 +26,8 @@ exports.field = function(source,operator,options) { if(text !== null && !operator.regexp.exec(text)) { results.push(title); } + } else { + results.push(title); } }); } else { @@ -35,6 +37,8 @@ exports.field = function(source,operator,options) { if(text !== null && text !== operator.operand) { results.push(title); } + } else { + results.push(title); } }); } diff --git a/core/modules/filters/has.js b/core/modules/filters/has.js index 87e9953ec..9a82f3111 100644 --- a/core/modules/filters/has.js +++ b/core/modules/filters/has.js @@ -19,7 +19,7 @@ exports.has = function(source,operator,options) { var results = []; if(operator.prefix === "!") { source(function(tiddler,title) { - if(tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === "")) { + if(!tiddler || (tiddler && (!$tw.utils.hop(tiddler.fields,operator.operand) || tiddler.fields[operator.operand] === ""))) { results.push(title); } });