Skip to content

Commit acdcaa4

Browse files
johman10Conduitry
authored andcommitted
ensure correct requestAnimationFrame context (#2933)
1 parent be783c5 commit acdcaa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/internal/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function once(fn) {
8787
if (ran) return;
8888
ran = true;
8989
fn.call(this, ...args);
90-
}
90+
};
9191
}
9292

9393
const is_client = typeof window !== 'undefined';
@@ -96,7 +96,7 @@ export let now: () => number = is_client
9696
? () => window.performance.now()
9797
: () => Date.now();
9898

99-
export let raf = is_client ? requestAnimationFrame : noop;
99+
export let raf = cb => requestAnimationFrame(cb);
100100

101101
// used internally for testing
102102
export function set_now(fn) {

0 commit comments

Comments
 (0)