Skip to content

Commit 1caabed

Browse files
danhaydendiasbruno
authored andcommitted
[fixed] Uncaught TypeError: Cannot read property 'state' of null when unmouting
1 parent 92c23b5 commit 1caabed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/components/Modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export default class Modal extends Component {
127127
}
128128

129129
componentWillUnmount() {
130-
if (!this.node) return;
130+
if (!this.node || !this.portal) return;
131131

132132
const state = this.portal.state;
133133
const now = Date.now();

0 commit comments

Comments
 (0)