diff --git a/src/ui/preact/navigation_component.tsx b/src/ui/preact/navigation_component.tsx index cb89b6a..faaa5b5 100644 --- a/src/ui/preact/navigation_component.tsx +++ b/src/ui/preact/navigation_component.tsx @@ -22,7 +22,7 @@ export type NavigationComponentProps = { rebooter: Rebooter; // Locator to control the device locating. - locator: Locator; + locator: Locator | null; // Notificator to send notifications. notificator: Notificator; @@ -62,9 +62,11 @@ export class NavigationComponent extends Component<
- + {this.props.locator && ( + + )} @@ -119,7 +121,7 @@ export class NavigationComponent extends Component< return; } - const err = await this.props.locator.flip(); + const err = await this.props.locator!.flip(); if (err) { console.error( "navigation_component: failed to toggle device locating:",