From 8c378e0d24e9f4b8986316bc17f077b894d1eb30 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Sat, 25 Feb 2023 13:41:13 +0000 Subject: [PATCH] Let widget should specify a default value for variables Fixes #7270 --- core/modules/widgets/let.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/modules/widgets/let.js b/core/modules/widgets/let.js index afd3a2f20..dd3aa137a 100644 --- a/core/modules/widgets/let.js +++ b/core/modules/widgets/let.js @@ -74,7 +74,9 @@ LetWidget.prototype.getVariableInfo = function(name,options) { text: this.currentValueFor[name] }; } - return Widget.prototype.getVariableInfo.call(this,name,options); + return Widget.prototype.getVariableInfo.call(this,name,$tw.utils.extend(Object.create(null),options,{ + defaultValue: "" + })); }; /*