Skip to content

Commit ffe06e3

Browse files
committed
web: TacComponents: UsbOverloadNotification: fix note on disconnect
The topic value can both be `null` (no overload error was set by the host) and `undefined` (no value was set yet or the host is currently disconnected). Check for both when deciding whether to show the notification or not to prevent it from being from shown on connection loss. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
1 parent d8c419a commit ffe06e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/TacComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ export function UsbOverloadNotification() {
608608
<Alert
609609
statusIconAriaLabel="Warning"
610610
type="warning"
611-
visible={overload !== null}
611+
visible={overload !== undefined && overload !== null}
612612
header={header}
613613
>
614614
Disconnect {detail} or use a powered hub to resolve this issue.

0 commit comments

Comments
 (0)