pull/10798/head
Rich Harris 2 years ago
parent 8ab8ae3b71
commit a7aef7132c

@ -1,5 +1,5 @@
import { noop, run } from '../../../common.js'; import { noop, run } from '../../../common.js';
import { render_effect, user_effect } from '../../reactivity/effects.js'; import { user_effect } from '../../reactivity/effects.js';
import { current_effect, untrack } from '../../runtime.js'; import { current_effect, untrack } from '../../runtime.js';
import { raf } from '../../timing.js'; import { raf } from '../../timing.js';
import { loop } from '../../loop.js'; import { loop } from '../../loop.js';
@ -7,12 +7,6 @@ import { run_transitions } from '../../render.js';
import { TRANSITION_GLOBAL, TRANSITION_IN, TRANSITION_OUT } from '../../constants.js'; import { TRANSITION_GLOBAL, TRANSITION_IN, TRANSITION_OUT } from '../../constants.js';
import { is_function } from '../../utils.js'; import { is_function } from '../../utils.js';
const active_tick_animations = new Set();
const DELAY_NEXT_TICK = Number.MIN_SAFE_INTEGER;
/** @type {undefined | number} */
let active_tick_ref = undefined;
/** /**
* @template P * @template P
* @param {HTMLElement} dom * @param {HTMLElement} dom
@ -87,8 +81,8 @@ const linear = (t) => t;
/** @param {() => any} fn */ /** @param {() => any} fn */
function defer(fn) { function defer(fn) {
return new Promise((fulfil) => { return new Promise((fulfil) => {
render_effect(() => { user_effect(() => {
fulfil(fn()); fulfil(untrack(fn));
}); });
}); });
} }

Loading…
Cancel
Save