Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create maps in 5.2.0 #502

Closed
2 tasks
mweststrate opened this issue Jan 10, 2020 · 2 comments
Closed
2 tasks

Cannot create maps in 5.2.0 #502

mweststrate opened this issue Jan 10, 2020 · 2 comments
Labels

Comments

@mweststrate
Copy link
Collaborator

🐛 Bug Report

Draft a Map

Uncaught TypeError: Constructor Map requires 'new'
    at DraftMap.Map (<anonymous>)
    at new DraftMap (immer.js:984)
    at proxyMap (immer.js:1137)
    at Immer.createProxy$1 [as createProxy] (immer.js:1654)
    at Object.get (immer.js:595)
    at plugins.tsx:63
    at Immer.produce (immer.js:1528)
    at reducer (plugins.tsx:62)
    at combination (redux.js:464)
    at p (<anonymous>:1:36402)
    at v (<anonymous>:1:36684)
    at <anonymous>:1:40069
    at Object.dispatch (redux.js:218)
    at Object.e [as dispatch] (<anonymous>:1:40553)
    at _default (plugins.tsx:64)
    at index.tsx:40

Link to repro

_A bug report without a reproduction is not a bug report. _

Please provide either a CodeSandbox demo, or a PR with a unit test. In limited cases, a minimal repository on GitHub is accepted as well.

To Reproduce

Steps to reproduce the behavior:

Observed behavior

A description of what behavior you observed and consider faulty.

Expected behavior

A clear and concise description of what you expected to happen.

Environment

We only accept bug reports against the latest Immer version.

  • Immer version:
  • Occurs with setUseProxies(true)
  • Occurs with setUseProxies(false) (ES5 only)
@gurkerl83
Copy link

The same thing happens when Set gets used.

@aleclarson
Copy link
Member

🎉 This issue has been resolved in version 5.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants