🐛 Bug Report
If you pass window.location as the draft to produce, IE11 throws an error. The error is essentially the same one described in this core-js issue.
In short, IE11's native Object.getOwnPropertyDescriptor can't work with environment exotic objects which is the cause for this bug.
You can easily reproduce the issue by pasting this in your IE11 Dev Tools and hitting enter.
Object.getOwnPropertyDescriptor(window.location, 'host')
Link to repro
https://github.com/kdelmonte/immer-ie11-window-location-bug
To Reproduce
To verify that the app loads fine in IE 11 without this bug:
- Comment out the lines 9-11 in the
src/index.js file
- Run
yarn build && serve -s build once again
Observed behavior
If you pass window.location as the draft to produce, IE11 throws an error.
Expected behavior
produce should be able to successfully create a draft from any object in any of the supported browsers.
Environment
- Latest version of Windows 10
- Latest version of IE11
- Immer 5.2.0
🐛 Bug Report
If you pass window.location as the draft to
produce, IE11 throws an error. The error is essentially the same one described in this core-js issue.In short, IE11's native
Object.getOwnPropertyDescriptorcan't work with environment exotic objects which is the cause for this bug.You can easily reproduce the issue by pasting this in your IE11 Dev Tools and hitting enter.
Link to repro
https://github.com/kdelmonte/immer-ie11-window-location-bug
To Reproduce
yarn build && serve -s buildTo verify that the app loads fine in IE 11 without this bug:
src/index.jsfileyarn build && serve -s buildonce againObserved behavior
If you pass window.location as the draft to
produce, IE11 throws an error.Expected behavior
produceshould be able to successfully create a draft from any object in any of the supported browsers.Environment
setUseProxies(true)setUseProxies(false)(ES5 only)