Fix empty hardware when fetching hardware info (#13738)

This commit is contained in:
Paul Bottein 2022-09-14 11:13:32 +02:00 committed by GitHub
parent 490d46396e
commit 321914d53a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,7 +205,7 @@ class HaConfigSystemNavigation extends LitElement {
const hardwareInfo: HardwareInfo = await this.hass.callWS({
type: "hardware/info",
});
this._boardName = hardwareInfo?.hardware?.[0].name;
this._boardName = hardwareInfo?.hardware?.[0]?.name;
} else if (isHassioLoaded) {
const osData: HassioHassOSInfo = await fetchHassioHassOsInfo(this.hass);
if (osData.board) {