Fix "Cancel exclusion" button for Z-Wave (#26188)

This commit is contained in:
Petar Petrov 2025-07-16 18:29:28 +03:00 committed by Bram Kragten
parent 361474885f
commit cf3c40f5f7

View File

@ -323,7 +323,7 @@ class DialogZWaveJSRemoveNode extends LitElement {
this._subscribed.then((unsub) => unsub && unsub()); this._subscribed.then((unsub) => unsub && unsub());
this._subscribed = undefined; this._subscribed = undefined;
} }
if (this._step === "exclusion") { if (this._step === "exclusion" && this._entryId) {
this._stopExclusion(); this._stopExclusion();
} }
if (this._removeNodeTimeoutHandle) { if (this._removeNodeTimeoutHandle) {
@ -332,6 +332,7 @@ class DialogZWaveJSRemoveNode extends LitElement {
}; };
public closeDialog(): void { public closeDialog(): void {
this._unsubscribe();
this._entryId = undefined; this._entryId = undefined;
} }