Skip to content

Commit

Permalink
fix: translate removal reason enum value to its name
Browse files Browse the repository at this point in the history
Fixes #3927
  • Loading branch information
robertsLando committed Oct 7, 2024
1 parent e8667de commit 18bddac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/lib/ZwaveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4757,7 +4757,11 @@ class ZwaveClient extends TypedEventEmitter<ZwaveClientEventCallbacks> {
*
*/
private _onNodeRemoved(zwaveNode: ZWaveNode, reason: RemoveNodeReason) {
this.logNode(zwaveNode, 'info', 'Removed, reason: ' + reason)
this.logNode(
zwaveNode,
'info',
'Removed, reason: ' + getEnumMemberName(RemoveNodeReason, reason),
)
zwaveNode.removeAllListeners()

this.emit(
Expand Down

0 comments on commit 18bddac

Please sign in to comment.