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:
parent
4f5a923ca0
commit
1c283c5586
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user