Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix(driverProviders): Check config in the right place. (#3991)
Browse files Browse the repository at this point in the history
  • Loading branch information
heathkit committed Jan 20, 2017
1 parent eb89920 commit e68dcf1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/driverProviders/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ export class Local extends DriverProvider {

let serverConf = this.config_.localSeleniumStandaloneOpts || {};

if (!Array.isArray(serverConf.jvmArgs)) {
throw new ConfigError(logger, 'jvmArgs should be an array.');
}

// If args or port is not set use seleniumArgs and seleniumPort
// for backward compatibility
if (serverConf.args === undefined) {
serverConf.args = this.config_.seleniumArgs || [];
}
if (serverConf.jvmArgs === undefined) {
serverConf.jvmArgs = this.config_.jvmArgs || [];
} else {
if (!Array.isArray(serverConf.jvmArgs)) {
throw new ConfigError(logger, 'jvmArgs should be an array.');
}
}
if (serverConf.port === undefined) {
serverConf.port = this.config_.seleniumPort;
Expand Down

0 comments on commit e68dcf1

Please sign in to comment.