Make sure requestAnimationFrame has the correct context when triggered

pull/3016/head
Johan van Eck 6 years ago
parent 52b5e05ead
commit b05842c59b

@ -96,7 +96,7 @@ export let now: () => number = is_client
? () => window.performance.now()
: () => Date.now();
export let raf = is_client ? requestAnimationFrame : noop;
export let raf = is_client ? requestAnimationFrame.bind(window) : noop;
// used internally for testing
export function set_now(fn) {

Loading…
Cancel
Save