pull/10798/head
Rich Harris 2 years ago
parent bf476cc312
commit 807ffcb51a

@ -174,7 +174,7 @@ export function bind_transition(element, get_fn, get_params, direction, global)
if (!current_options?.duration) { if (!current_options?.duration) {
current_options = null; current_options = null;
callback?.(); callback();
return; return;
} }
@ -207,7 +207,7 @@ export function bind_transition(element, get_fn, get_params, direction, global)
.then(() => { .then(() => {
p = target; p = target;
current_animation = current_options = null; current_animation = current_options = null;
callback?.(); callback();
}) })
.catch(noop); .catch(noop);
} else if (tick) { } else if (tick) {
@ -238,6 +238,8 @@ export function bind_transition(element, get_fn, get_params, direction, global)
}); });
current_options = null; current_options = null;
} else {
setTimeout(callback, duration);
} }
} }
}; };

@ -345,7 +345,7 @@ export type ProxyStateObject<T = Record<string | symbol, any>> = T & {
// happy we don't need them, and rename this // happy we don't need them, and rename this
export interface Transition2 { export interface Transition2 {
global: boolean; global: boolean;
to(target: number, callback?: () => void): void; to(target: number, callback: () => void): void;
} }
export * from './reactivity/types'; export * from './reactivity/types';

Loading…
Cancel
Save