From f78190ef616e7918baf8d0eba65e269125a150b8 Mon Sep 17 00:00:00 2001 From: Xavier Cazin Date: Thu, 15 Mar 2018 15:12:33 +0100 Subject: [PATCH] Allow empty string as value parameter in SetWidget (#3164) When occuring in a tiddler named "New Tiddler", the following construct should return ++ instead of +[[New Tiddler]]+ <$set name="myVariable" filter="[all[current]field:title[New Tiddler]]" value=""> +<>+ --- core/modules/widgets/setvariable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/setvariable.js b/core/modules/widgets/setvariable.js index 3da727066..dda00af89 100755 --- a/core/modules/widgets/setvariable.js +++ b/core/modules/widgets/setvariable.js @@ -70,7 +70,7 @@ SetWidget.prototype.getValue = function() { } } else if(this.setFilter) { var results = this.wiki.filterTiddlers(this.setFilter,this); - if(!this.setValue) { + if(this.setValue == null) { var select; if(this.setSelect) { select = parseInt(this.setSelect,10);