From ae58fe221bac1cc8b3726ecbfa6f788194e29f46 Mon Sep 17 00:00:00 2001 From: Hedger Wang Date: Tue, 27 Oct 2015 18:28:42 -0700 Subject: [PATCH] Stop handling animation once Navigator is unmounted. Summary: public Navigator subscribes to its internal animation spring that may still asks navigator to re-render after being unmounted. This diff clears the listeners of its animation spring once navigator is unmounted. Reviewed By: zjj010104 Differential Revision: D2588434 fb-gh-sync-id: 2b3ee65d3a6c3d45e5c6904d1dc65ac5a3e4534a --- Libraries/CustomComponents/Navigator/Navigator.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/CustomComponents/Navigator/Navigator.js b/Libraries/CustomComponents/Navigator/Navigator.js index 5be2782f7..62af7493c 100644 --- a/Libraries/CustomComponents/Navigator/Navigator.js +++ b/Libraries/CustomComponents/Navigator/Navigator.js @@ -346,6 +346,7 @@ var Navigator = React.createClass({ this._navigationContext.dispose(); this._navigationContext = null; } + this.spring.removeAllListeners(); }, /**