Skip to content

Commit

Permalink
fix: use isUnsupervisedOrSucceeded util
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed May 22, 2023
1 parent 765794e commit e7cfc48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ZWaveErrorCodes,
SupervisionStatus,
SupervisionResult,
isUnsupervisedOrSucceeded,
} from '@zwave-js/core'
import { isDocker } from '@zwave-js/shared'
import {
Expand Down Expand Up @@ -1397,7 +1398,7 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
// if result is not defined here we don't have a way
// to know if the command was successful or not as there is no
// 'get' command for this, so we just assume it was successful
if (!result || result.status === SupervisionStatus.Success) {
if (isUnsupervisedOrSucceeded(result)) {
const node = this._nodes.get(nodeId)

if (node) {
Expand Down

0 comments on commit e7cfc48

Please sign in to comment.