1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Fix up missing variable values

We were crashing if a variable was inadvertantly set to undefined
This commit is contained in:
Jeremy Ruston 2013-11-04 10:00:34 +00:00
parent adf16eeaf3
commit ff4d76f045

View File

@ -88,7 +88,7 @@ Widget.prototype.getVariable = function(name,options) {
return this.evaluateMacroModule(name,actualParams,options.defaultValue);
}
// Get the value
var value = node.variables[name].value;
var value = node.variables[name].value || "";
// Substitute any parameters specified in the definition
value = this.substituteVariableParameters(value,node.variables[name].params,actualParams);
value = this.substituteVariableReferences(value);