Skip to content

Commit 520a140

Browse files
committed
fix: respect the unidirectional nature of time
1 parent 4c4f18b commit 520a140

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/sixty-tables-fold.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: respect the unidirectional nature of time

packages/svelte/src/internal/client/loop.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { raf } from './timing.js';
44
// TODO move this into timing.js where it probably belongs
55

66
/**
7-
* @param {number} now
87
* @returns {void}
98
*/
10-
function run_tasks(now) {
9+
function run_tasks() {
10+
const now = raf.now();
11+
1112
raf.tasks.forEach((task) => {
1213
if (!task.c(now)) {
1314
raf.tasks.delete(task);

0 commit comments

Comments
 (0)