Skip to content
Myr

fix: Fixed regression in Object.frozen for IE11. Fixes #600

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Michel Weststrate · committed by Michel Weststrate · parent d4b2def · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:src/core/finalize.ts+1 added-1 removed
modified:src/utils/common.ts+1 added-1 removed
178 unmodified lines
179 return Object.create(Object.getPrototypeOf(base), descriptors)180}181182export function freeze(obj: any, deep: boolean): void {183 if (Object.isFrozen(obj) || isDraft(obj) || !isDraftable(obj)) return183 if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj)) return184 if (getArchtype(obj) > 1 /* Map or Set */) {185 obj.set = obj.add = obj.clear = obj.delete = dontMutateFrozenCollections as any186 }187 Object.freeze(obj)
12 unmodified lines