Skip to content

Replace .includes with .indexOf for older Node 4 versions#1813

Merged
wyze merged 1 commit into
masterfrom
fix-ls-args-again
Nov 14, 2016
Merged

Replace .includes with .indexOf for older Node 4 versions#1813
wyze merged 1 commit into
masterfrom
fix-ls-args-again

Conversation

@wyze

@wyze wyze commented Nov 14, 2016

Copy link
Copy Markdown
Member

Summary

It was reported in #1792 (comment) that this code did not work on Node v4.

Test plan

All tests still pass. Confirmed working on Node v4 here: #1792 (comment)

@wyze

wyze commented Nov 14, 2016

Copy link
Copy Markdown
Member Author

Failure on CircleCI is not related. Was a timeout with normalize-manifest test.

@wyze wyze merged commit d202c73 into master Nov 14, 2016
@wyze wyze deleted the fix-ls-args-again branch November 14, 2016 16:37
@develar

develar commented Nov 14, 2016

Copy link
Copy Markdown

Maybe it is better to use babel-plugin-array-includes to avoid such code?

@ljharb

ljharb commented Nov 14, 2016

Copy link
Copy Markdown

Or https://npm us.com/array-includes :-p then you're version-independent.

@develar

develar commented Nov 14, 2016

Copy link
Copy Markdown

@ljharb array-includes it is runtime dependency, babel solution has zero-overhead ;)

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