File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,8 +48,10 @@ export default defineNuxtPlugin(nuxtApp => {
4848 finishTransition = resolve
4949 } )
5050
51- let changeRoute : ( ) => void
52- const ready = new Promise < void > ( resolve => ( changeRoute = resolve ) )
51+ let changeRoute : ( ) => void = ( ) => { }
52+ const ready = new Promise < void > ( resolve => {
53+ changeRoute = resolve
54+ } )
5355
5456 try {
5557 transition = document . startViewTransition ( ( ) => {
@@ -60,8 +62,9 @@ export default defineNuxtPlugin(nuxtApp => {
6062 transition . finished . finally ( resetTransitionState )
6163 await nuxtApp . callHook ( 'page:view-transition:start' , transition )
6264 } catch ( err ) {
65+ // oxlint-disable-next-line no-console -- error logging
6366 console . error ( 'View Transition failed:' , err )
64- changeRoute ! ( )
67+ changeRoute ( )
6568 finishTransition ?.( )
6669 resetTransitionState ( )
6770 }
You can’t perform that action at this time.
0 commit comments