Skip to content

Commit fa2dbe1

Browse files
committed
Handle when elements disappear without unmounting
1 parent adfce03 commit fa2dbe1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/TouchScrollable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class TouchScrollable extends PureComponent<Props> {
3232
}
3333
componentWillUnmount() {
3434
if (!canUseEventListeners) return;
35+
if (!this.scrollableArea) return;
3536

3637
this.scrollableArea.removeEventListener(
3738
'touchstart',

0 commit comments

Comments
 (0)