-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
IE11 breaks if window.location is passed to produce #504
Comments
I might be wrong, but immer isn't intended to be used with exotic object. |
@illuminist I think the docs use the phrase "normal JavaScript objects, arrays, Sets and Maps" to highlight the fact that immer does not have its own types such as Immutable.js. I don't think the phrase is there to explicitly exclude exotics. In any case, if this is true and the immer community has no interest in supporting exotics, the docs should be updated to reflect this. Let's see what the maintainers have to say. |
Correct. Feel free to PR an `Exotic objects are not supported` behind that
or in the pitfalls section :)
…On Wed, Jan 29, 2020 at 1:01 PM Kelvin Del Monte ***@***.***> wrote:
Immutability with normal JavaScript objects, arrays, Sets and Maps.
I might be wrong, but immer isn't intended to be used with exotic object.
@illuminist <https://github.com/illuminist> I think the docs use the
phrase "normal JavaScript objects, arrays, Sets and Maps" to highlight the
fact that immer does not have its own types such as Immutable.js. I don't
think the phrase is there to explicitly exclude exotics.
In any case, if this is true and the immer community has no interest in
supporting exotics, the docs should be updated to reflect this. Let's see
what the maintainers have to say.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#504?email_source=notifications&email_token=AAN4NBAQ4F5QMJ2Y5AHJMHTRAF43HA5CNFSM4KFHKKDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKHDLIY#issuecomment-579745187>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBFKM7XJ7AB3NEHEZSTRAF43HANCNFSM4KFHKKDA>
.
|
Include note about exotic objects not being supported #504
🐛 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.
Link to repro
https://github.com/kdelmonte/immer-ie11-window-location-bug
To Reproduce
yarn build && serve -s build
To verify that the app loads fine in IE 11 without this bug:
src/index.js
fileyarn build && serve -s build
once againObserved 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
setUseProxies(true)
setUseProxies(false)
(ES5 only)The text was updated successfully, but these errors were encountered: