@@ -31,6 +31,7 @@ const DELAY_NEXT_TICK = Number.MIN_SAFE_INTEGER;
3131
3232/** @type {undefined | number } */
3333let active_tick_ref = undefined ;
34+ let skip_mount_intro = false ;
3435
3536/**
3637 * @template T
@@ -482,7 +483,6 @@ export function bind_transition(dom, get_transition_fn, props_fn, direction, glo
482483 // @ts -ignore
483484 dom . __animate = true ;
484485 }
485- let foo = false ;
486486 /** @type {import('./types.js').Block | null } */
487487 let transition_block = block ;
488488 main: while ( transition_block !== null ) {
@@ -496,7 +496,7 @@ export function bind_transition(dom, get_transition_fn, props_fn, direction, glo
496496 can_show_intro_on_mount = true ;
497497 } else if ( transition_block . t === IF_BLOCK ) {
498498 transition_block . r = if_block_transition ;
499- if ( can_show_intro_on_mount ) {
499+ if ( can_show_intro_on_mount && ! skip_mount_intro ) {
500500 /** @type {import('./types.js').Block | null } */
501501 let if_block = transition_block ;
502502 while ( if_block . t === IF_BLOCK ) {
@@ -511,14 +511,14 @@ export function bind_transition(dom, get_transition_fn, props_fn, direction, glo
511511 }
512512 }
513513 if ( ! can_apply_lazy_transitions && can_show_intro_on_mount ) {
514- can_show_intro_on_mount = transition_block . e !== null ;
515- foo = true ;
514+ can_show_intro_on_mount = ! skip_mount_intro && transition_block . e !== null ;
516515 }
517516 if ( can_show_intro_on_mount || ! global ) {
518517 can_apply_lazy_transitions = true ;
519518 }
520519 } else if ( transition_block . t === ROOT_BLOCK && ! can_apply_lazy_transitions ) {
521- can_show_intro_on_mount = transition_block . e !== null || transition_block . i ;
520+ can_show_intro_on_mount =
521+ ( ! skip_mount_intro && transition_block . e !== null ) || transition_block . i ;
522522 }
523523 transition_block = transition_block . p ;
524524 }
@@ -529,7 +529,12 @@ export function bind_transition(dom, get_transition_fn, props_fn, direction, glo
529529 effect ( ( ) => {
530530 if ( transition !== undefined ) {
531531 // Destroy any existing transitions first
532- transition . x ( ) ;
532+ try {
533+ // skip_mount_intro = true;
534+ transition . x ( ) ;
535+ } finally {
536+ skip_mount_intro = false ;
537+ }
533538 }
534539 const transition_fn = get_transition_fn ( ) ;
535540 /** @param {DOMRect } [from] */
0 commit comments