1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 17:40:29 +00:00

Transcluding functions: fix missing parameters passed as undefined

Thanks @btheado – see https://github.com/Jermolene/TiddlyWiki5/pull/6666#issuecomment-1276187372
This commit is contained in:
jeremy@jermolene.com 2022-10-12 17:15:39 +01:00
parent 76bc3a7358
commit 3a4589dc79

View File

@ -220,7 +220,7 @@ TranscludeWidget.prototype.getTransclusionTarget = function() {
} else if(self.hasAttribute(index + "")) { } else if(self.hasAttribute(index + "")) {
variables[name] = self.getAttribute(index + ""); variables[name] = self.getAttribute(index + "");
} else { } else {
variables[name] = param["default"]; variables[name] = param["default"] || "";
} }
}); });
var result = this.wiki.filterTiddlers(srcVariable.value,this.makeFakeWidgetWithVariables(variables),this.wiki.makeTiddlerIterator([]))[0] || ""; var result = this.wiki.filterTiddlers(srcVariable.value,this.makeFakeWidgetWithVariables(variables),this.wiki.makeTiddlerIterator([]))[0] || "";