mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-10-30 07:03:00 +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:
@@ -21,7 +21,7 @@ exports.has = function(source,operator,options) {
|
|||||||
function checkTiddler(title) {
|
function checkTiddler(title) {
|
||||||
var tiddler = options.wiki.getTiddler(title);
|
var tiddler = options.wiki.getTiddler(title);
|
||||||
if(tiddler) {
|
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 === "!") {
|
if(operator.prefix === "!") {
|
||||||
match = !match;
|
match = !match;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user