From 23a4ad09de27f4515d29314021fb0ea8ce1abc37 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Fri, 24 Feb 2017 02:30:27 -0500 Subject: [PATCH] Fix "Component not mounted" error in FileActions --- js/component/file-actions.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/component/file-actions.js b/js/component/file-actions.js index 0eab19dea..583d094d1 100644 --- a/js/component/file-actions.js +++ b/js/component/file-actions.js @@ -252,9 +252,11 @@ export let FileActions = React.createClass({ }); }, onFileInfoUpdate: function(fileInfo) { - this.setState({ - fileInfo: fileInfo, - }); + if (this.isMounted) { + this.setState({ + fileInfo: fileInfo, + }); + } }, componentDidMount: function() { this._isMounted = true;