Fix issue where schema is null (#8322)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Joakim Sørensen 2021-02-04 14:01:53 +01:00 committed by GitHub
parent 9ccfa79199
commit 4273b72d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -108,7 +108,9 @@ class HassioAddonConfig extends LitElement {
protected firstUpdated(changedProps) {
super.firstUpdated(changedProps);
this._canShowSchema = !this.addon.schema.find(
this._canShowSchema =
this.addon.schema !== null &&
!this.addon.schema.find(
// @ts-ignore
(entry) => !SUPPORTED_UI_TYPES.includes(entry.type) || entry.multiple
);

View File

@ -64,7 +64,7 @@ export interface HassioAddonDetails extends HassioAddonInfo {
privileged: any;
protected: boolean;
rating: "1-6";
schema: HaFormSchema[];
schema: HaFormSchema[] | null;
services_role: string[];
slug: string;
startup: "initialize" | "system" | "services" | "application" | "once";