This commit is contained in:
Aidan Timson
2025-10-15 11:50:15 +01:00
parent 2a135c50ce
commit a9219a8779

View File

@@ -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);
} }
}; };