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

Uncaught TypeError: Cannot assign to read only property '@@toStringTag' of [object Object] #24

Closed
amangeot opened this issue Sep 26, 2017 · 1 comment
Assignees
Labels

Comments

@amangeot
Copy link

amangeot commented Sep 26, 2017

Hello,
I have an issue with, I believe, the way Symbols are polyfilled. I receive this error when Facebook's regenerator starts polyfilling:
Uncaught TypeError: Cannot assign to read only property '@@toStringTag' of [object Object]

Here is a similar issue with another polyfill-service:
polyfillpolyfill/polyfill-service#1295

Here's how I use the polyfill:

if (typeof Symbol === 'undefined') {
  require('es6-symbol/implement')
}

Is it possible to set Symbol.toStringTag to be writable as they do here ?
polyfillpolyfill/polyfill-service@b31d234

@medikoo medikoo self-assigned this Sep 27, 2017
@medikoo
Copy link
Owner

medikoo commented Sep 27, 2017

@amangeot thanks for report. Still it follows the behavior of native symbol: http://www.ecma-international.org/ecma-262/6.0/#sec-symbol.prototype-@@tostringtag

e.g. run this fiddle in Chrome with console open: https://jsfiddle.net/medikoo/5g66e20r/
It shows exactly same exception when tried on native symbol (no polyfill involved)

If Facebook's regenator crashes on that, it's bug on their side not in this polyfill. Please report it to them

I'm closing it, but if you still have some questions or want to add a comment do not hesitate. Let's continue the discussion.

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

No branches or pull requests

2 participants