1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-17 23:34:50 +00:00

Tighten "has" filter operator

We now require the field not to be an empty string in order to be
counted.
This commit is contained in:
Jermolene 2014-01-20 08:59:01 +00:00
parent 4f5a923ca0
commit 1c283c5586

View File

@ -21,7 +21,7 @@ exports.has = function(source,operator,options) {
function checkTiddler(title) {
var tiddler = options.wiki.getTiddler(title);
if(tiddler) {
var match = $tw.utils.hop(tiddler.fields,operator.operand);
var match = $tw.utils.hop(tiddler.fields,operator.operand) && tiddler.fields[operator.operand] !== "";
if(operator.prefix === "!") {
match = !match;
}