Skip to content

fix(ie11): replace Object.assign and Array.from. #15

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ritz078
Copy link

@ritz078 ritz078 commented Mar 16, 2018

Object.assign is not supported on IE11

@ritz078 ritz078 changed the title fix(ie11): replace Object.assign with object spread operators. fix(ie11): replace Object.assign and Array.from. Mar 16, 2018
Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s expected that you’re using https://npmjs.com/airbnb-browser-shims in your app; separately, the compiler doesn’t run in browsers so I’m not sure it needs any treatment.

@@ -49,7 +49,8 @@
"dependencies": {
"aphrodite": "^1.2.5",
"array.prototype.flatten": "^1.2.1",
"global-cache": "^1.2.1"
"global-cache": "^1.2.1",
"object-assign": "^4.1.1"
Copy link
Collaborator

@ljharb ljharb Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, please use object.assign, not the hyphen one - but second, this can be done with a babel transform (see react-dates for an example) and then it will also work for object spreads.

@@ -54,6 +54,7 @@
},
"dependencies": {
"aphrodite": "^1.2.4",
"array-from": "^2.1.1",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module polyfills the environment, so we must not use it.

@lencioni
Copy link
Contributor

lencioni commented Mar 16, 2018

It’s expected that you’re using https://npmjs.com/airbnb-browser-shims in your app

This is not documented in the readme, but should be

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

Successfully merging this pull request may close these issues.

3 participants