kopia lustrzana https://github.com/miklobit/TiddlyWiki5
More defensive checks
We’ve had a few bugs with the symptom of ‘text’ being undefined.print-window-tiddler
rodzic
7998686cb3
commit
5a23c883e2
|
@ -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: ""});
|
||||
});
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue