Skip to content

Commit 242ffce

Browse files
retyuinaqvitalha
andauthored
Cleanup pending timers after unmounting a component (#1159)
Co-authored-by: Talha Naqvi <[email protected]>
1 parent 93d8ccb commit 242ffce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/viewability/ViewabilityHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ class ViewabilityHelper {
8989
const timeoutId = setTimeout(() => {
9090
this.timers.delete(timeoutId);
9191
this.checkViewableIndicesChanges(newViewableIndices);
92-
this.timers.add(timeoutId);
9392
}, minimumViewTime);
93+
this.timers.add(timeoutId);
9494
} else {
9595
this.checkViewableIndicesChanges(newViewableIndices);
9696
}

0 commit comments

Comments
 (0)