Skip to content

Object values of a Map are not frozen anymore #1119

Open
@alexlazau

Description

@alexlazau

🐛 Bug Report

Starting with Immer 10.0.4, enableMapSet() does not seem to work as expected as values (if objects) of a native Map aren't frozen anymore.

Link to repro

https://stackblitz.com/edit/immer-10-0-4-map-bug

To Reproduce

Create a Map with objects by using produce and check the values of the Map with Object.isFrozen(...).

Observed behavior

Objects inside a Map are not frozen.

Expected behavior

Objects inside a Map are frozen. The provided repo works if the Immer version is set to 10.0.3.

Environment

  • Immer version: 10.0.4
  • I filed this report against the latest version of Immer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions