Skip to content

Commit

Permalink
simplifying includes polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Grip committed Dec 21, 2017
1 parent f3b3c18 commit 8eaf579
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/printer-php.js
Expand Up @@ -11,12 +11,7 @@ const softline = docBuilders.softline;

// polyfill for node 4
function includes(array, val) {
for (let i = 0, len = array.length; i < len; i++) {
if (array[i] === val) {
return true;
}
}
return false;
return array.indexOf(val) !== -1;
}

function genericPrint(path) {
Expand Down

0 comments on commit 8eaf579

Please sign in to comment.