diff --git a/packages/client/composables/useViewTransition.ts b/packages/client/composables/useViewTransition.ts index a5341b354e..d7eea924ee 100644 --- a/packages/client/composables/useViewTransition.ts +++ b/packages/client/composables/useViewTransition.ts @@ -17,7 +17,7 @@ export function useViewTransition() { const toMeta = getSlide(to.params.no as string)?.meta const fromNo = fromMeta?.slide?.no const toNo = toMeta?.slide?.no - const transitionType = fromNo != null && toNo != null + const transitionType = fromNo != null && toNo != null && fromNo !== toNo && ((fromNo < toNo ? fromMeta?.transition : toMeta?.transition) ?? configs.transition) if (transitionType !== 'view-transition') { isViewTransition.value = false @@ -41,7 +41,6 @@ export function useViewTransition() { // Wait for `TransitionGroup` to become normal `div` setTimeout(() => { - // @ts-expect-error missing types document.startViewTransition(() => { changeRoute() return promise