1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-30 12:00:28 +00:00

More comments

This commit is contained in:
jeremy@jermolene.com 2022-09-03 16:57:38 +01:00
parent 1b08cd40bf
commit 966707ea1c

View File

@ -20,6 +20,7 @@ var fieldFilterOperatorFn = require("$:/core/modules/filters/field.js").field;
Export our filter function Export our filter function
*/ */
exports["[unknown]"] = function(source,operator,options) { exports["[unknown]"] = function(source,operator,options) {
// Check for a user defined filter operator
if(operator.operator.charAt(0) === ".") { if(operator.operator.charAt(0) === ".") {
var customDefinition = options.widget && options.widget.getVariableInfo && options.widget.getVariableInfo(operator.operator); var customDefinition = options.widget && options.widget.getVariableInfo && options.widget.getVariableInfo(operator.operator);
if(customDefinition && customDefinition.srcVariable && customDefinition.srcVariable.isFunctionDefinition) { if(customDefinition && customDefinition.srcVariable && customDefinition.srcVariable.isFunctionDefinition) {
@ -43,6 +44,7 @@ exports["[unknown]"] = function(source,operator,options) {
} }
} }
} }
// Otherwise, use the "field" operator
return fieldFilterOperatorFn(source,operator,options); return fieldFilterOperatorFn(source,operator,options);
}; };