From 8eaf5792d7afa3b989890e9a9b436d706d018697 Mon Sep 17 00:00:00 2001 From: Mike Grip Date: Thu, 21 Dec 2017 17:19:41 -0500 Subject: [PATCH] simplifying includes polyfill --- src/printer-php.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/printer-php.js b/src/printer-php.js index 1e54dccf3a53..967453efe561 100644 --- a/src/printer-php.js +++ b/src/printer-php.js @@ -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) {