fix: respect the unidirectional nature of time

pull/14541/head
Rich Harris 2 years ago
parent 4c4f18b24c
commit 520a140c52

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: respect the unidirectional nature of time

@ -4,10 +4,11 @@ import { raf } from './timing.js';
// TODO move this into timing.js where it probably belongs
/**
* @param {number} now
* @returns {void}
*/
function run_tasks(now) {
function run_tasks() {
const now = raf.now();
raf.tasks.forEach((task) => {
if (!task.c(now)) {
raf.tasks.delete(task);

Loading…
Cancel
Save