diff --git a/lib/Toast.js b/lib/Toast.js index f765306..4c0798c 100644 --- a/lib/Toast.js +++ b/lib/Toast.js @@ -35,14 +35,12 @@ class Toast extends Component { componentWillMount = () => { this._toast = new RootSiblings(); }; componentWillReceiveProps = nextProps => { this._toast.update(); }; diff --git a/lib/ToastContainer.js b/lib/ToastContainer.js index a661d5c..2404876 100644 --- a/lib/ToastContainer.js +++ b/lib/ToastContainer.js @@ -140,7 +140,7 @@ class ToastContainer extends Component { componentWillUnmount = () => { Dimensions.removeEventListener('change', this._windowChanged); Keyboard.removeListener('keyboardDidChangeFrame', this._keyboardDidChangeFrame); - this._hide(); + this._root && this._hide(); }; _animating = false;