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

Remove use of spread operator #2920

Merged
merged 1 commit into from Apr 17, 2019

Conversation

Projects
None yet
2 participants
@tombye
Copy link
Contributor

commented Apr 17, 2019

This is a temporary fix for the fact that the babel helper that transforms uses of the spread syntax has a function in its call stack that assumes Symbols are supported.

IE11 and below don't support Symbols so this causes an error when it runs our JS.

This swaps out use of the spread operator for a use of apply to unpack the arguments object.

Related issue on babel:

babel/babel#7597

Remove use of spread operator
This is a temporary fix for the fact that the
babel plugin for the spread operator calls a
function called `_iterableToArray` which assumes
the JavaScript runtime supports Symbols.

IE11 doesn't support Symbols so this causes an
error when it runs our JS.

This swaps out use of the spread operator for a
use of
[apply](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply)
to unpack the `arguments` object.

Related issue on babel:

babel/babel#7597
@quis

quis approved these changes Apr 17, 2019

@tombye tombye merged commit 2aaf38d into master Apr 17, 2019

3 checks passed

Jenkins Build finished.
Details
coverage/coveralls Coverage remained the same at 93.549%
Details
pyup.io/safety-ci No dependencies with known security vulnerabilities.
Details

@tombye tombye deleted the remove-use-of-spread-operator branch Apr 17, 2019

robwalch added a commit to jwplayer/jwplayer that referenced this pull request Jun 12, 2019

Remove use of spread operator
(babel transform uses Symbol, not supported in IE11 alphagov/notifications-admin#2920)

johnBartos added a commit to jwplayer/jwplayer that referenced this pull request Jun 12, 2019

Remove use of spread operator (#3434)
(babel transform uses Symbol, not supported in IE11 alphagov/notifications-admin#2920)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.