Fixed text widget crashing when text is missing

`<$text text=<<missingVariable>>/>` was crashing
print-window-tiddler
Jermolene 2014-08-28 20:20:38 +01:00
rodzic 2ae574d5ca
commit d945492b8b
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -30,7 +30,7 @@ TextNodeWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
var text = this.getAttribute("text",this.parseTreeNode.text);
var text = this.getAttribute("text",this.parseTreeNode.text || "");
text = text.replace(/\r/mg,"");
var textNode = this.document.createTextNode(text);
parent.insertBefore(textNode,nextSibling);