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

Commit e68dcf1

Browse files
authoredJan 20, 2017
fix(driverProviders): Check config in the right place. (#3991)
1 parent eb89920 commit e68dcf1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎lib/driverProviders/local.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ export class Local extends DriverProvider {
100100

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

103-
if (!Array.isArray(serverConf.jvmArgs)) {
104-
throw new ConfigError(logger, 'jvmArgs should be an array.');
105-
}
106-
107103
// If args or port is not set use seleniumArgs and seleniumPort
108104
// for backward compatibility
109105
if (serverConf.args === undefined) {
110106
serverConf.args = this.config_.seleniumArgs || [];
111107
}
112108
if (serverConf.jvmArgs === undefined) {
113109
serverConf.jvmArgs = this.config_.jvmArgs || [];
110+
} else {
111+
if (!Array.isArray(serverConf.jvmArgs)) {
112+
throw new ConfigError(logger, 'jvmArgs should be an array.');
113+
}
114114
}
115115
if (serverConf.port === undefined) {
116116
serverConf.port = this.config_.seleniumPort;

0 commit comments

Comments
 (0)
This repository has been archived.