From 4aedb72590e72b8f0319236eaa6dd01b5f731b8b Mon Sep 17 00:00:00 2001 From: Keith Pine Date: Sat, 2 Dec 2023 12:10:42 -0800 Subject: [PATCH] fix: check for undefined driver --- api/lib/ZwaveClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/lib/ZwaveClient.ts b/api/lib/ZwaveClient.ts index b23aa84744..7004d643a0 100644 --- a/api/lib/ZwaveClient.ts +++ b/api/lib/ZwaveClient.ts @@ -3990,7 +3990,7 @@ class ZwaveClient extends TypedEventEmitter { 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' &&