diff --git a/README.md b/README.md index 78de49c..ee6c1dd 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ Ui fixes * ~~projects autocomplete~~ * ~~add time ago to build list~~ * ~~show scm changes on build page~~ -* react says many many times to console: - Warning: setState(...): Can only update a mounted or mounting component. - This usually means you called setState() on an unmounted component. - This is a no-op. +* ~~react says many many times to console:~~ + ~~Warning: setState(...): Can only update a mounted or mounting component.~~ + ~~This usually means you called setState() on an unmounted component.~~ + ~~This is a no-op.~~ * show duration details (steps duration) on build page * speed up build points animation at ff * current successfully streak icons at project page diff --git a/static/js/app/components/common/progress/index.js b/static/js/app/components/common/progress/index.js index cd9a258..eeaaf2e 100644 --- a/static/js/app/components/common/progress/index.js +++ b/static/js/app/components/common/progress/index.js @@ -13,13 +13,16 @@ define([ build.project.avgBuildDuration * 100); }, componentDidMount: function() { - var self = this, - updateCallback = function() { + var self = this; + var updateCallback = function() { if (self.props.build.status === 'in-progress') { - self.setState({percent: self._computePercent()}); - _.delay(updateCallback, 100); + if (self.isMounted()) { + self.setState({percent: self._computePercent()}); + _.delay(updateCallback, 100); + } } - } + }; + updateCallback(); }, getInitialState: function() {