mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-02 10:58:01 +00:00
Freeze the fields of a tiddler
Thus enforcing the immutability of tiddler objects
This commit is contained in:
@@ -747,6 +747,8 @@ $tw.Tiddler = function(/* [fields,] fields */) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Freeze the tiddler against modification
|
||||
Object.freeze(this.fields);
|
||||
};
|
||||
|
||||
$tw.Tiddler.prototype.hasField = function(field) {
|
||||
|
Reference in New Issue
Block a user