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

IE11: Cannot define property 'name': object is not extensible #193

Closed
glortho opened this issue Apr 22, 2016 · 1 comment
Closed

IE11: Cannot define property 'name': object is not extensible #193

glortho opened this issue Apr 22, 2016 · 1 comment

Comments

@glortho
Copy link

glortho commented Apr 22, 2016

When using es6.function.name (and es6.symbol) in IE11 there appear to be some circumstances where dP(this, NAME, createDesc(5, name)) in https://github.com/zloirock/core-js/blob/master/modules/es6.function.name.js#L13 throws the above error, presumably because the object has been frozen or sealed.

One such case where this happens is in certain accesses of componentClass.name here: https://github.com/facebook/react/blob/67f8524e88abbf1ac0fd86d38a0477d11fbc7b3e/src/isomorphic/classic/element/ReactElementValidator.js#L237 .

This approach is a safer alternative, though with some obvious drawbacks by comparison: https://github.com/JamesMGreene/Function.name/blob/master/Function.name.js

@zloirock
Copy link
Owner

Ok, I will add a fallback for frozen functions.

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

No branches or pull requests

2 participants