Skip to content

Commit b378b8e

Browse files
committed
fix: this.listener is not a function
1 parent 710796b commit b378b8e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/Session/withAuthentication.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const withAuthentication = Component => {
4848
}
4949

5050
componentWillUnmount() {
51-
this.listener();
51+
this.listener && this.listener();
5252
}
5353

5454
render() {

src/components/Session/withAuthorization.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const withAuthorization = condition => Component => {
3333
}
3434

3535
componentWillUnmount() {
36-
this.listener();
36+
this.listener && this.listener();
3737
}
3838

3939
render() {

0 commit comments

Comments
 (0)