Skip to content

Commit

Permalink
use clearTimeout rather than clearInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed Mar 18, 2024
1 parent dc33584 commit 3bd1aad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/factories/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function dataFactory(runId: string, callback: DataCallback) {

// todo: need a global way of stopping this when the graph is stopped
function stop(): void {
clearInterval(interval)
clearTimeout(interval)
}

return {
Expand Down
2 changes: 1 addition & 1 deletion src/factories/eventData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function eventDataFactory(

// todo: need a global way of stopping this when the graph is stopped
function stop(): void {
clearInterval(interval)
clearTimeout(interval)
}

return {
Expand Down

0 comments on commit 3bd1aad

Please sign in to comment.