Skip to content

Commit

Permalink
fix: check for undefined driver
Browse files Browse the repository at this point in the history
  • Loading branch information
kpine committed Dec 2, 2023
1 parent e6710bb commit 4aedb72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3990,7 +3990,7 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {

logger.log('info', 'Calling api %s with args: %o', apiName, args)

if (this.driverReady || this.driver.isInBootloader()) {
if (this.driverReady || this.driver?.isInBootloader()) {
try {
const allowed =
typeof this[apiName] === 'function' &&
Expand Down

0 comments on commit 4aedb72

Please sign in to comment.