From 5a14b376861b339b2b9c585d0d377822498314de Mon Sep 17 00:00:00 2001 From: Matt Lauber Date: Tue, 16 Feb 2016 08:08:09 -0500 Subject: [PATCH] Update to check if empty sting OR (is array AND is empty) --- core/modules/filters/has.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/filters/has.js b/core/modules/filters/has.js index f19bda492..7b2fde46d 100644 --- a/core/modules/filters/has.js +++ b/core/modules/filters/has.js @@ -25,7 +25,7 @@ exports.has = function(source,operator,options) { }); } else { source(function(tiddler,title) { - if(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] != "") { + if(tiddler && $tw.utils.hop(tiddler.fields,operator.operand) && (tiddler.fields[operator.operand] !== "" || ($tw.utils.isArray(tiddler.fields[operator.operand]) && tiddler.fields[operator.operand].length == 0))) { results.push(title); } });