mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-11 02:49:16 +00:00
fix updating of unmounted progress bar
This commit is contained in:
parent
059a6fe00c
commit
bfdfaa9be2
@ -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
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user