File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11import type { scope as scopeFn } from "simple:scope" ;
2- import { transitionEnabledOnThisPage } from "astro/virtual-modules/transitions-router.js" ;
2+ import {
3+ transitionEnabledOnThisPage ,
4+ supportsViewTransitions ,
5+ } from "astro/virtual-modules/transitions-router.js" ;
36
47export function create$ ( scope : typeof scopeFn ) {
58 const anyMatchSelector = `[data-target$=${ JSON . stringify ( scope ( ) ) } ` ;
@@ -25,7 +28,7 @@ export function create$(scope: typeof scopeFn) {
2528 return [ ...document . querySelectorAll ( selector ) ] ;
2629 } ,
2730 ready ( callback : ( ) => MaybePromise < undefined | ( ( ) => void ) > ) {
28- if ( transitionEnabledOnThisPage ( ) ) {
31+ if ( supportsViewTransitions && transitionEnabledOnThisPage ( ) ) {
2932 let cleanup : ( ( ) => void ) | undefined ;
3033
3134 document . addEventListener ( "astro:page-load" , async ( ) => {
You can’t perform that action at this time.
0 commit comments