Skip to content

Commit

Permalink
Fix error when requestIdleCallback is unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
cyreb7 committed Mar 19, 2024
1 parent 05b0ddf commit a499ff5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ricTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ class RicTracker {
}

stop() {
if (!this.available) {
return
}

cancelIdleCallback(this.#idleCallbackId)
this.#idleCallbackId = undefined
}
Expand Down

0 comments on commit a499ff5

Please sign in to comment.