mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-18 03:19:55 +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:
parent
8904a6dba6
commit
b47f505588
|
@ -812,6 +812,7 @@ $tw.Tiddler = function(/* [fields,] fields */) {
|
||||||
}
|
}
|
||||||
// Freeze the tiddler against modification
|
// Freeze the tiddler against modification
|
||||||
Object.freeze(this.fields);
|
Object.freeze(this.fields);
|
||||||
|
Object.freeze(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
$tw.Tiddler.prototype.hasField = function(field) {
|
$tw.Tiddler.prototype.hasField = function(field) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user