Fix launcher in case of empty arguments (#582)

The regression was introduced in
d5327e6a0f
This commit is contained in:
Andrey Lushnikov 2017-08-28 14:59:41 -07:00 committed by GitHub
parent d5327e6a0f
commit 8f66f7339e

View File

@ -55,7 +55,7 @@ class Launcher {
options = options || {}; options = options || {};
let temporaryUserDataDir = null; let temporaryUserDataDir = null;
const chromeArguments = [].concat(DEFAULT_ARGS); 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) if (!options.userDataDir)
temporaryUserDataDir = fs.mkdtempSync(CHROME_PROFILE_PATH); temporaryUserDataDir = fs.mkdtempSync(CHROME_PROFILE_PATH);