From f633476f60bbd0f6bc8dc1db0522a041795496b1 Mon Sep 17 00:00:00 2001 From: jquense Date: Sat, 14 Nov 2015 13:44:22 -0500 Subject: [PATCH] [fixed] clean up modal styles if unmounted during exit transition --- src/Modal.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Modal.js b/src/Modal.js index 1cf3ee7c..6a65d43c 100644 --- a/src/Modal.js +++ b/src/Modal.js @@ -276,7 +276,9 @@ const Modal = React.createClass({ }, componentWillUnmount() { - if (this.props.show) { + let { show, transition } = this.props; + + if (show || (transition && !this.state.exited)) { this.onHide(); } },