Skip to content

Commit 63d3e8e

Browse files
authored
Merge pull request #443 from browserstack/AFD_1529_add_check_for_null_bsconfig
Handle null bsConfig for redactBsconfig method
2 parents f6fcafd + cdb2456 commit 63d3e8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/helpers/usageReporting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ function isUsageReportingEnabled() {
173173
}
174174

175175
function redactBsConfig(bsConfig) {
176-
if(typeof bsConfig === 'object' && !utils.isUndefined(bsConfig.run_settings)) {
176+
if(typeof bsConfig === 'object' && !utils.isUndefined(bsConfig) && !utils.isUndefined(bsConfig.run_settings)) {
177177
if(!utils.isUndefined(bsConfig.run_settings["projectId"])) { bsConfig.run_settings["projectId"] = REDACTED }
178178
if(!utils.isUndefined(bsConfig.run_settings["record-key"])) { bsConfig.run_settings["record-key"] = REDACTED }
179179
}

0 commit comments

Comments
 (0)