From f499d5b4069074a6ecb5c3d8f4fef45ee39b8cee Mon Sep 17 00:00:00 2001 From: kpine Date: Mon, 4 Dec 2023 00:37:13 -0800 Subject: [PATCH] fix: check for undefined driver (#3464) --- 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 b23aa84744d..7004d643a04 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' &&