diff --git a/packages/svelte/src/internal/client/timing.js b/packages/svelte/src/internal/client/timing.js index dc7d2ce4edf0..18dfc6c58397 100644 --- a/packages/svelte/src/internal/client/timing.js +++ b/packages/svelte/src/internal/client/timing.js @@ -3,13 +3,11 @@ import { noop } from '../shared/utils.js'; import { BROWSER } from 'esm-env'; -const request_animation_frame = BROWSER ? requestAnimationFrame : noop; - const now = BROWSER ? () => performance.now() : () => Date.now(); /** @type {Raf} */ export const raf = { - tick: /** @param {any} _ */ (_) => request_animation_frame(_), + tick: /** @param {any} _ */ (_) => (BROWSER ? requestAnimationFrame : noop)(_), now: () => now(), tasks: new Set() };