From 78da313682af249bcefdfd051937b90ddb813493 Mon Sep 17 00:00:00 2001 From: Fatima Ranile Date: Fri, 4 Aug 2017 18:29:01 +0800 Subject: [PATCH] resolve #24 --- lib/ToastContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ToastContainer.js b/lib/ToastContainer.js index 631b88c..ad459db 100644 --- a/lib/ToastContainer.js +++ b/lib/ToastContainer.js @@ -130,7 +130,7 @@ class ToastContainer extends Component { }; componentWillUnmount = () => { - this._hide(); + this._root&&this._hide(); }; shouldComponentUpdate = (nextProps, nextState) => {