1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Merge pull request #1565 from felixhayashi/patch-5

Bugfix: Object.freeze() called on null
This commit is contained in:
Jeremy Ruston 2015-03-10 20:31:15 +00:00
commit 2710049865

View File

@ -793,7 +793,7 @@ $tw.Tiddler = function(/* [fields,] fields */) {
value = src[t];
}
// Freeze the field to keep it immutable
if(typeof value === "object") {
if(value != null && typeof value === "object") {
Object.freeze(value);
}
this.fields[t] = value;