From 8c4bb620a8159e45d9dce58b0edd9f6672fbf0a9 Mon Sep 17 00:00:00 2001 From: MiguelMadero Date: Thu, 13 Apr 2017 16:10:41 -0700 Subject: [PATCH] Avoids using Array.prototype.includes since it is not avaialble in node 4. Fixes https://github.com/yarnpkg/yarn/issues/3138 --- src/cli/commands/global.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/commands/global.js b/src/cli/commands/global.js index 99b80c0e5d..cffc322293 100644 --- a/src/cli/commands/global.js +++ b/src/cli/commands/global.js @@ -179,7 +179,7 @@ const {run, setFlags: _setFlags} = buildSubCommands('global', { await updateCwd(config); const updateBins = await initUpdateBins(config, reporter, flags); - if (args.includes('yarn')) { + if (args.indexOf('yarn') !== -1) { reporter.warn(reporter.lang('packageContainsYarnAsGlobal')); }