mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-14 13:31:10 +00:00
fix
This commit is contained in:
@@ -171,11 +171,21 @@ export const closeLastDialog = async () => {
|
||||
""
|
||||
);
|
||||
}
|
||||
return closed;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
export const closeAllDialogs = () =>
|
||||
Promise.all(OPEN_DIALOG_STACK.map((state) => closeDialog(state.dialogTag)));
|
||||
export const closeAllDialogs = async () => {
|
||||
while (OPEN_DIALOG_STACK.length) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const closed = await closeLastDialog();
|
||||
if (!closed) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const _handleClosed = async (ev: HASSDomEvent<DialogClosedParams>) => {
|
||||
// If not closed by navigating back, remove the open state from history
|
||||
|
||||
Reference in New Issue
Block a user