Freeze the entire tiddler object

As seen in the first pass of #2247, it was previously inadvertently
possible for callers to modify the tiddler object itself by adding and
replacing properties.
print-window-tiddler
Jermolene 2016-02-05 17:39:02 +00:00
rodzic 8904a6dba6
commit b47f505588
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -812,6 +812,7 @@ $tw.Tiddler = function(/* [fields,] fields */) {
}
// Freeze the tiddler against modification
Object.freeze(this.fields);
Object.freeze(this);
};
$tw.Tiddler.prototype.hasField = function(field) {