1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-06 10:46:57 +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") {
var variableInfo = this.getVariableInfo(attribute.value.name,{params: attribute.value.params});
if(variableInfo) {
if(options.asList) {
value = variableInfo.resultList;
} else {
value = variableInfo.text || "";
}
if(options.asList) {
value = variableInfo.resultList;
} else {
value = variableInfo.text;
}
} else if(attribute.type === "substituted") {
value = this.wiki.getSubstitutedText(attribute.rawValue,this) || "";