We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3437e6 commit 08bc37aCopy full SHA for 08bc37a
packages/svelte/src/internal/client/timing.js
@@ -3,13 +3,11 @@ import { noop } from '../shared/utils.js';
3
4
import { BROWSER } from 'esm-env';
5
6
-const request_animation_frame = BROWSER ? requestAnimationFrame : noop;
7
-
8
const now = BROWSER ? () => performance.now() : () => Date.now();
9
10
/** @type {Raf} */
11
export const raf = {
12
- tick: /** @param {any} _ */ (_) => request_animation_frame(_),
+ tick: /** @param {any} _ */ (_) => (BROWSER ? requestAnimationFrame : noop)(_),
13
now: () => now(),
14
tasks: new Set()
15
};
0 commit comments