-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(Symbol.iterator): no longer polyfilled #3389
feat(Symbol.iterator): no longer polyfilled #3389
Conversation
NOTE: The only worry I have with this change is that we're no longer watching for the weirdness with older versions of Firefox.. however that should be covered by a proper polyfill. |
Generated by 🚫 dangerJS |
src/internal/symbol/iterator.ts
Outdated
polyfill. We don't want to throw on this, because it's not required | ||
by the library. However it will provide clues to users on older | ||
browsers why things like `from(iterable)` doesn't work. */ | ||
if (!Symbol.iterator) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe Symbol.iterator
and Symbol
itself were both defined in ES2015 so if Symbol.iterator
isn't available it's likely that Symbol
isn't either and this may error. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! Good catch!
src/internal/symbol/iterator.ts
Outdated
} | ||
|
||
export const iterator = symbolIteratorPonyfill(root); | ||
/** The native Symbol.iterator instance or a string */ | ||
export const iterator = Symbol.iterator || '@@iterator'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue here Uncaught ReferenceError: Symbol is not defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
BREAKING CHANGE: We are no longer polyfilling `Symbol.iterator`. That would be done by a proper polyfilling library
1b14541
to
a3c8585
Compare
polyfill. We don't want to throw on this, because it's not required | ||
by the library. However it will provide clues to users on older | ||
browsers why things like `from(iterable)` doesn't work. */ | ||
if (!Symbol || !Symbol.iterator) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
BREAKING CHANGE: We are no longer polyfilling
Symbol.iterator
. That would be done by a proper polyfilling library