immer
immer copied to clipboard
fix: Freezing of Map values during finalization
Findings
Map keys are not enumerable properties of the Map object, so the propertyIsEnumerable check does not apply to them.
This fails the check in finalizeProperty of src/core/finalize.ts.
Changes
- Added a condition to detect
Mapobjects and usesMap.prototype.hasto check for key existence.
Fixes #1119