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 .includes to better support IE #51

Merged
merged 1 commit into from
Oct 7, 2018
Merged

Remove use of .includes to better support IE #51

merged 1 commit into from
Oct 7, 2018

Conversation

MatthewHerbst
Copy link
Owner

This fixes an issue identified in #49 that seems to have been first brought up in #43

This replaces the one use of Array.prototype.includes with Array.prototype.indexOf, which can be used to achieve the same thing: x.includes(y) === x.indexOf(y) > -1. This allows the code to work in IE11 and earlier, which do not support .includes

I've also standardized the browsers targets across the .babelrc and rollup.config.js files to make them consistent, along with minor code formatting improvements.

This replaces the one use of `Array.prototype.includes` with
`Array.prototype.indexOf`, which can be used to achieve the same
thing: `x.includes(y) === x.indexOf(y) > -1`. This allows the code
to work in IE11 and earlier, which do not support `.includes`

I've also standardized the `browsers` targets across the `.babelrc`
and `roolup.config.js` files to make them consistent.
@gregnb
Copy link
Collaborator

gregnb commented Oct 7, 2018

Thanks for the PR!

@gregnb gregnb merged commit 40c38b2 into MatthewHerbst:master Oct 7, 2018
@MatthewHerbst MatthewHerbst deleted the improved-ie-support branch November 5, 2018 08:02
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.

2 participants