Skip to content

Commit 1b805fb

Browse files
authored
Merge pull request #38 from jr-k/patch-1
Important ! Listener is not removed
2 parents db77930 + 9a36a78 commit 1b805fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TriggeringView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class TriggeringView extends Component<Props, State> {
7474
return;
7575
}
7676
this.context.scrollY.removeListener(this.listenerId);
77-
nextContext.scrollY.addListener(this.onScroll);
77+
this.listenerId = nextContext.scrollY.addListener(this.onScroll);
7878
}
7979

8080
onRef = (ref: any) => {

0 commit comments

Comments
 (0)