Skip to content

Commit 4272125

Browse files
committed
fix: memory leak with updateVariantTimeout
1 parent 25f6c15 commit 4272125

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Experiment.js

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class Experiment extends React.Component {
8080
}
8181

8282
componentWillUnmount() {
83+
clearTimeout(this.updateVariantTimeout);
8384
typeof window !== "undefined" &&
8485
window.gtag &&
8586
window.gtag("event", "optimize.callback", {

0 commit comments

Comments
 (0)