Skip to content

Commit

Permalink
🪟 🐛 Fix small memory leak by adding destructor to clear credit check …
Browse files Browse the repository at this point in the history
…interval (#15891)

* fix memory leak by adding desctructor to clear credit check interval

* simplify destructor
  • Loading branch information
lmossman authored and rodireich committed Aug 25, 2022
1 parent 6dfba01 commit 6ff146d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ const RemainingCredits: React.FC<Props> = ({ selfServiceCheckoutEnabled }) => {
}, 3000);
}
}

return () => clearInterval(retryIntervalId.current);
});

useEffect(() => {
Expand Down

0 comments on commit 6ff146d

Please sign in to comment.