1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-14 17:39:56 +00:00

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.
This commit is contained in:
Jermolene 2016-02-05 17:39:02 +00:00
parent 8904a6dba6
commit b47f505588

View File

@ -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) {