1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-01 08:42:49 +00:00

Fix bug with missing variable attributes

See https://github.com/TiddlyWiki/TiddlyWiki5/pull/8972#issuecomment-2752792329
This commit is contained in:
Jeremy Ruston 2025-03-26 20:32:35 +00:00
parent f15e9e309e
commit b6a171cf5e

View File

@ -405,12 +405,10 @@ Widget.prototype.computeAttribute = function(attribute,options) {
} }
} else if(attribute.type === "macro") { } else if(attribute.type === "macro") {
var variableInfo = this.getVariableInfo(attribute.value.name,{params: attribute.value.params}); var variableInfo = this.getVariableInfo(attribute.value.name,{params: attribute.value.params});
if(variableInfo) { if(options.asList) {
if(options.asList) { value = variableInfo.resultList;
value = variableInfo.resultList; } else {
} else { value = variableInfo.text;
value = variableInfo.text || "";
}
} }
} else if(attribute.type === "substituted") { } else if(attribute.type === "substituted") {
value = this.wiki.getSubstitutedText(attribute.rawValue,this) || ""; value = this.wiki.getSubstitutedText(attribute.rawValue,this) || "";