-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Native Map detection in ReactComponentTreeHook fails with core-js #7593
Comments
Do you have any suggestions on what we could do? |
Only ugly solutions like detecting feature availability in iframe var iframe = document.createElement('iframe');
document.body.appendChild(iframe);
return !!iframe.contentWindow.Map; |
Is running DEV builds on an old browser a major use case for you? |
For me it's not a problem at all. I just wanted to attract attention to problem with nativeness detection and core-js if this detection will be used somewhere else in future. |
I do think we want to use ES6 Maps in the production code path eventually, so It won't always be a dev-only issue |
We don't use that code anymore. But also, React 16 explicitly asks you to polyfill Map because we use them elsewhere. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Using polyfilled ES6
Map
on browsers without native Map supportIf the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar
https://jsfiddle.net/t5ht7mmb/1/ –
isNative
returnstrue
on IE9What is the expected behavior?
Using objects instead of
Map
. WhileisNative
method has been implemented in #7491 it can't detect core-js polyfills. Look at discussion in comments here: lodash/lodash@e156459#diff-001d0647fb00f8336795faccdec19a31R11199Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
15.3.1
The text was updated successfully, but these errors were encountered: