Skip to content

Commit

Permalink
[fixed] Uncaught TypeError: Cannot read property 'state' of null wh…
Browse files Browse the repository at this point in the history
…en unmouting
  • Loading branch information
danhayden authored and diasbruno committed Aug 10, 2017
1 parent 92c23b5 commit 1caabed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default class Modal extends Component {
}

componentWillUnmount() {
if (!this.node) return;
if (!this.node || !this.portal) return;

const state = this.portal.state;
const now = Date.now();
Expand Down

0 comments on commit 1caabed

Please sign in to comment.