From b6a171cf5ecc4fd8e57e840f0047932c14c67bf9 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 26 Mar 2025 20:32:35 +0000 Subject: [PATCH] Fix bug with missing variable attributes See https://github.com/TiddlyWiki/TiddlyWiki5/pull/8972#issuecomment-2752792329 --- core/modules/widgets/widget.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index aed331c80..0674df670 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -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) || "";