Skip to content

Commit 6f4a2ef

Browse files
committed
fix: prevent pages transition on desktop
1 parent 8c354ec commit 6f4a2ef

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

platforms/metagram/src/routes/+layout.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
1010
onNavigate((navigation) => {
1111
if (!document.startViewTransition) return;
12+
if (!window.matchMedia('(max-width: 768px)').matches) {
13+
return;
14+
}
1215
1316
const currentRoute = navigation.from?.url.pathname;
1417
const targetRoute = navigation.to?.url.pathname;

0 commit comments

Comments
 (0)