fix: ui error on restart (#26153)

This commit is contained in:
Michael Geers 2025-12-22 14:27:21 +01:00 • committed by GitHub
parent ca7e319edf
commit 71ccde6e2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,7 @@ export default defineComponent({
},
computed: {
sponsorActive(): boolean {
return !!this.sponsor?.status.name;
return !!this.sponsor?.status?.name;
},
},
});

View file

@ -242,7 +242,7 @@ export default defineComponent({
},
computed: {
sponsorActive(): boolean {
return !!this.sponsor?.status.name;
return !!this.sponsor?.status?.name;
},
tariffLink() {
return `${docsPrefix()}/docs/reference/configuration/tariffs`;

View file

@ -176,7 +176,7 @@ export default defineComponent({
return this.providers.length > 0;
},
sponsorExpires(): boolean {
return !!this.sponsor?.status.expiresSoon;
return !!this.sponsor?.status?.expiresSoon;
},
showConfigBadge() {
return this.sponsorExpires || isUserConfigError(this.fatal);

View file

@ -391,7 +391,7 @@ export interface SponsorStatus {
}
export interface Sponsor {
status: SponsorStatus;
status?: SponsorStatus;
fromYaml: boolean;
}

View file

@ -688,7 +688,7 @@ export default defineComponent({
return store.state?.sponsor;
},
isSponsor(): boolean {
return !!this.sponsor?.status.name;
return !!this.sponsor?.status?.name;
},
ocpp() {
return store.state?.ocpp;