kopia lustrzana https://github.com/miklobit/TiddlyWiki5
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
rodzic
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) {
|
||||||
|
|
Ładowanie…
Reference in New Issue