Skip to content

Commit

Permalink
Catch errors thrown by client.createWorker
Browse files Browse the repository at this point in the history
When using the `.then($1, $2)` function, any errors thrown from `$1` will *not* be delegated to `$2`. Changing to `.then($1).catch($2)` makes sure that even errors from `$1` gets delegated to `$2`.

Found by this proposed standard rule: standard/eslint-config-standard#129
  • Loading branch information
LinusU committed Aug 27, 2018
1 parent 310c228 commit 50556b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ var BrowserStackBrowser = function (
}
})
})
}, function () {
}).catch(function () {
emitter.emit('browser_process_failure', self)
})
}
Expand Down

0 comments on commit 50556b6

Please sign in to comment.