1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-12 11:10:27 +00:00

Clean up unknown filter

This commit is contained in:
jeremy@jermolene.com 2022-05-30 18:04:37 +01:00
parent 0c3f82855b
commit bd9d7c3d6a

View File

@ -26,11 +26,8 @@ exports["[unknown]"] = function(source,operator,options) {
var variables = Object.create(null); var variables = Object.create(null);
// Go through each of the defined parameters, and make a variable with the value of the corresponding operand // Go through each of the defined parameters, and make a variable with the value of the corresponding operand
$tw.utils.each(customDefinition.srcVariable.params,function(param,index) { $tw.utils.each(customDefinition.srcVariable.params,function(param,index) {
var value = operator.operands["" + index]; var value = operator.operands[index];
if(value === undefined) { variables[param.name] = value === undefined ? param["default"] || "" : value;
value = param["default"] || "";
}
variables[param.name] = value;
}); });
var list = options.wiki.filterTiddlers(customDefinition.srcVariable.value,options.widget.makeFakeWidgetWithVariables(variables),source); var list = options.wiki.filterTiddlers(customDefinition.srcVariable.value,options.widget.makeFakeWidgetWithVariables(variables),source);
if(operator.prefix === "!") { if(operator.prefix === "!") {