-
-
Notifications
You must be signed in to change notification settings - Fork 850
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
Symbol.for error on IE11 #365
Comments
Sounds like you are using an incomplete polyfill?
Op di 14 mei 2019 16:34 schreef Fabrizio Catitti <notifications@github.com>:
… 🐛 Bug Report
I get this error on IE11:
Object doesn't support property or method 'for'
on
var DRAFTABLE = typeof Symbol !== "undefined" ?
Symbol.for("immer-draftable") : "
*$immer_draftable"; var DRAFT_STATE = typeof Symbol !== "undefined" ?
Symbol.for("immer-state") : "*$immer_state";
on IE11 Symbol is not undefined actually but for it is, so I guess there
should be also a check for Symbol.for existence like typeof Symbol ===
'function' && Symbol.for
this appeared on the latest version of immer, previous version were (I was
on 2.0.0) were not affected
To Reproduce
Using the latest version of immer I get this error on IE11: Object doesn't
support property or method 'for'
Environment
- *Immer version: 3.1.1*
- Occurs with setUseProxies(true)
- Occurs with setUseProxies(false) (ES5 only)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#365?email_source=notifications&email_token=AAN4NBDVCRRAISUTEVJIJJLPVLEX3A5CNFSM4HM2SWM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GTWFJ7Q>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN4NBC3TJTQU335VN5NSTTPVLEX3ANCNFSM4HM2SWMQ>
.
|
I'm not using a polyfill actually (and I would prefer to avoid it if possible :) ). thank you! |
Pr is welcome!
Op di 14 mei 2019 17:45 schreef Fabrizio Catitti <notifications@github.com>:
… I'm not using a polyfill actually (and I would prefer to avoid it if
possible :) ).
In version 2.0.0
var DRAFT_STATE = typeof Symbol !== "undefined" ? Symbol("immer-state") :
"__$immer_state";
was working fine in IE11 without requiring to add Symbol polyfill, while
on version 2.1.3 was changed to
var DRAFT_STATE = typeof Symbol !== "undefined" ?
Symbol.for("immer-state") : "__$immer_state";
which brakes IE11 because Symbol is not undefined but Symbol.for actually
is. Adding a && Symbol.for would fix the issue on IE11 without requiring
to add a polyfill for it.
thank you!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#365?email_source=notifications&email_token=AAN4NBEBPBFXAME7OQ2BO33PVLNABA5CNFSM4HM2SWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVL5C2A#issuecomment-492294504>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN4NBEHE4DBAIO43TQ5GWLPVLNABANCNFSM4HM2SWMQ>
.
|
Fascinating. I've seen other problems with Immer and IE11 (see #362), but not this one. In fact when I start an IE11 session in Browserstack and go into the console I can use |
Lol, how many different IE11's are out there? 😅
…On Tue, May 14, 2019 at 9:02 PM Scott Feeney ***@***.***> wrote:
Fascinating. I've seen other problems with Immer and IE11 (see #362
<#362>), but not this one. In fact
when I start an IE11 session in Browserstack and go into the console I can
use Symbol.for just fine with no issues at all.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#365?email_source=notifications&email_token=AAN4NBEGYW644PSQ4R6GWTLPVMEFPA5CNFSM4HM2SWM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVMO5OA#issuecomment-492367544>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAN4NBFDVKRWYX57HFZ6SJDPVMEFPANCNFSM4HM2SWMQ>
.
|
😄 microsoft browsers have always been erratic.. 🙈 unfortunately we still have traffic on IE and with great pain we need to support it. I have v. 11.590.17134.0 installed |
🎉 This issue has been resolved in version 3.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🐛 Bug Report
I get this error on IE11:
Object doesn't support property or method 'for'
on
on IE11 Symbol is not undefined actually but for it is, so I guess there should be also a check for Symbol.for existence like
typeof Symbol === 'function' && Symbol.for
this appeared on the latest version of immer, previous version were (I was on 2.0.0) not affected
To Reproduce
Using the latest version of immer I get this error on IE11: Object doesn't support property or method 'for'
Environment
setUseProxies(true)
setUseProxies(false)
(ES5 only)The text was updated successfully, but these errors were encountered: