1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-01 17:53:15 +00:00

Tweak comments

This commit is contained in:
jeremy@jermolene.com 2022-09-09 14:16:08 +01:00
parent 7aba21c1be
commit 977a133028

View File

@ -48,8 +48,9 @@ SetWidget.prototype.execute = function() {
this.setValue = this.getAttribute("value");
this.setEmptyValue = this.getAttribute("emptyValue");
this.setConditional = this.getAttribute("conditional","no") === "yes";
// Set context variable, checking for a conditional assignment
// Ignore if this is a conditional assignment and the variable already has a value
if(!this.setConditional || this.getVariableInfo(this.setName).text === undefined) {
// Set context variable
if(this.parseTreeNode.isMacroDefinition) {
this.setVariable(this.setName,this.getValue(),this.parseTreeNode.params,true);
} else if(this.parseTreeNode.isFunctionDefinition) {