mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 02:49:51 +00:00
Cleanup
This commit is contained in:
@@ -11,7 +11,7 @@ export const startViewTransition = async (
|
|||||||
!document.startViewTransition ||
|
!document.startViewTransition ||
|
||||||
window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
window.matchMedia("(prefers-reduced-motion: reduce)").matches
|
||||||
) {
|
) {
|
||||||
// Fallback: just run the update without transition
|
// Fallback: run the update without a transition
|
||||||
await updateCallback();
|
await updateCallback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -23,10 +23,8 @@ export const startViewTransition = async (
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await transition.finished;
|
await transition.finished;
|
||||||
} catch (error) {
|
} catch (_error) {
|
||||||
// Transitions can be skipped, which is fine
|
// Transitions can be skipped
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.debug("View transition skipped or failed:", error);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user