mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 01:06:35 +00:00
Guard for cloud integration not loaded (#23439)
This commit is contained in:
parent
fc8a8b28c2
commit
c3507abd9c
@ -101,7 +101,7 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
||||
agents.push(CORE_LOCAL_AGENT);
|
||||
}
|
||||
// Enable cloud location if logged in
|
||||
if (this._params.cloudStatus.logged_in) {
|
||||
if (this._params.cloudStatus?.logged_in) {
|
||||
agents.push(CLOUD_AGENT);
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,9 @@ class DialogGenerateBackup extends LitElement implements HassDialog {
|
||||
const { agents } = await fetchBackupAgentsInfo(this.hass);
|
||||
this._agentIds = agents
|
||||
.map((agent) => agent.agent_id)
|
||||
.filter((id) => id !== CLOUD_AGENT || this._params?.cloudStatus.logged_in)
|
||||
.filter(
|
||||
(id) => id !== CLOUD_AGENT || this._params?.cloudStatus?.logged_in
|
||||
)
|
||||
.sort(compareAgents);
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ import type { CloudStatus } from "../../../../data/cloud";
|
||||
export interface BackupOnboardingDialogParams {
|
||||
submit?: (value: boolean) => void;
|
||||
cancel?: () => void;
|
||||
cloudStatus: CloudStatus;
|
||||
cloudStatus?: CloudStatus;
|
||||
}
|
||||
|
||||
const loadDialog = () => import("./dialog-backup-onboarding");
|
||||
|
@ -5,7 +5,7 @@ import type { CloudStatus } from "../../../../data/cloud";
|
||||
export interface GenerateBackupDialogParams {
|
||||
submit?: (response: GenerateBackupParams) => void;
|
||||
cancel?: () => void;
|
||||
cloudStatus: CloudStatus;
|
||||
cloudStatus?: CloudStatus;
|
||||
}
|
||||
|
||||
export const loadGenerateBackupDialog = () =>
|
||||
|
@ -78,7 +78,7 @@ const TYPE_ORDER: Array<BackupType> = ["automatic", "manual", "imported"];
|
||||
class HaConfigBackupBackups extends SubscribeMixin(LitElement) {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ attribute: false }) public cloudStatus!: CloudStatus;
|
||||
@property({ attribute: false }) public cloudStatus?: CloudStatus;
|
||||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
|
@ -41,7 +41,7 @@ import { showUploadBackupDialog } from "./dialogs/show-dialog-upload-backup";
|
||||
class HaConfigBackupOverview extends LitElement {
|
||||
@property({ attribute: false }) public hass!: HomeAssistant;
|
||||
|
||||
@property({ attribute: false }) public cloudStatus!: CloudStatus;
|
||||
@property({ attribute: false }) public cloudStatus?: CloudStatus;
|
||||
|
||||
@property({ type: Boolean }) public narrow = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user