From 8f66f7339e23c122e3abdcf1ff2075ed0dfbc76f Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 28 Aug 2017 14:59:41 -0700 Subject: [PATCH] Fix launcher in case of empty arguments (#582) The regression was introduced in d5327e6a0fd384cd36bfd0b4a12b27ab362543a7 --- lib/Launcher.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Launcher.js b/lib/Launcher.js index 49f5e706..feac7173 100644 --- a/lib/Launcher.js +++ b/lib/Launcher.js @@ -55,7 +55,7 @@ class Launcher { options = options || {}; let temporaryUserDataDir = null; const chromeArguments = [].concat(DEFAULT_ARGS); - if (!options.args.some(arg => arg.startsWith('--user-data-dir'))) { + if (!options.args || !options.args.some(arg => arg.startsWith('--user-data-dir'))) { if (!options.userDataDir) temporaryUserDataDir = fs.mkdtempSync(CHROME_PROFILE_PATH);