File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 77
88 const transitionNextState = getPageTransitionTrigger ();
99
10- async function handleClick (e ) {
10+ function handleClick () {
1111 // TODO: this only works on click, not back/forward
12- const elm = e .target .closest (' a' );
13- // did this await make next wait for navigation?
14- await transitionNextState ();
12+ transitionNextState ();
1513 }
1614 </script >
1715
Original file line number Diff line number Diff line change @@ -15,13 +15,10 @@ export const getPageTransitionTrigger = () => {
1515 return null ;
1616 }
1717
18- return new Promise ( ( resolve ) => {
19- const transition = document . createDocumentTransition ( ) ;
20- transition . start ( async ( ) => {
21- resolve ( ) ;
22- await new Promise ( ( resolver ) => {
23- transitionStore . set ( { transition, resolver } ) ;
24- } ) ;
18+ const transition = document . createDocumentTransition ( ) ;
19+ transition . start ( async ( ) => {
20+ await new Promise ( ( resolver ) => {
21+ transitionStore . set ( { transition, resolver } ) ;
2522 } ) ;
2623 } ) ;
2724 } ;
You can’t perform that action at this time.
0 commit comments