mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-03-06 14:00:48 -08:00
More defensive checks
We’ve had a few bugs with the symptom of ‘text’ being undefined.
This commit is contained in:
parent
7998686cb3
commit
5a23c883e2
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ Widget.prototype.substituteVariableParameters = function(text,formalParams,actua
|
|||
|
||||
Widget.prototype.substituteVariableReferences = function(text) {
|
||||
var self = this;
|
||||
return text.replace(/\$\(([^\)\$]+)\)\$/g,function(match,p1,offset,string) {
|
||||
return (text || "").replace(/\$\(([^\)\$]+)\)\$/g,function(match,p1,offset,string) {
|
||||
return self.getVariable(p1,{defaultValue: ""});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue