Skip to content

Enable array spread and destructuring through recommended Babel polyfills

Mike Greiling requested to merge 25188-polyfill-es-symbol into master

What does this MR do?

Adds a polyfill for the Symbol class and Array.from() as recommended by babel. Some babel transforms (array spread, array destructuring, for..of, etc) rely on these features behind the scenes and will break in some browsers when they are not available.

The Airbnb style guide mandates the use of some of these methods, so I think it's a good idea to have them available:

Are there points in the code the reviewer needs to double check?

All tests should pass. I added an example of array destructuring within diff.js which will fail without the polyfill. There are other examples already in our codebase which won't work in IE, but for one reason or another do not cause any test failures. This should fix those as well.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #25188 (closed), #24922 (closed)

Merge request reports