Skip to content

Commit 219ce8a

Browse files
authored
Fix tracing fixture (#14917)
1 parent 8c19665 commit 219ce8a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fixtures/tracing/script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ function checkSchedulerAPI() {
3636
throw 'API is not defined';
3737
}
3838

39-
if (Scheduler.unstable_now() !== performance.now()) {
39+
const abs = Math.abs(Scheduler.unstable_now() - performance.now());
40+
if (typeof abs !== 'number' || Number.isNaN(abs) || abs > 5) {
4041
throw 'API does not work';
4142
}
4243

0 commit comments

Comments
 (0)