Skip to content

Commit aaa30ce

Browse files
committed
fix unmount when rendered out of context
1 parent 1ae93ce commit aaa30ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/Subscriber.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ class Subscriber extends React.Component {
3535
}
3636

3737
componentWillUnmount() {
38-
this.unsubscribe()
38+
if (this.unsubscribe)
39+
this.unsubscribe()
3940
}
4041

4142
render() {

0 commit comments

Comments
 (0)