Skip to content

Commit 9443af6

Browse files
author
Minh Tran
committed
Rebuild
1 parent 240e64b commit 9443af6

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-progress-bar-plus",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Progress bar component for ReactJS.",
55
"main": ["dist/progress-bar.css", "dist/react-progress-bar-plus.js"],
66
"keywords": [
@@ -23,4 +23,4 @@
2323
"devDependencies": {
2424
"bootstrap-customize": "~3.3.4"
2525
}
26-
}
26+
}

dist/react-progress-bar-plus.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/ProgressBar.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,18 @@ var ProgressBar = (function (_React$Component) {
4848
if (_this.interval) {
4949
clearInterval(_this.interval);
5050
}
51+
if (_this.timeout) {
52+
clearTimeout(_this.timeout);
53+
}
5154
};
5255

5356
this.componentWillReceiveProps = function (nextProps) {
5457
if (_this.interval) {
5558
clearInterval(_this.interval);
5659
}
60+
if (_this.timeout) {
61+
clearTimeout(_this.timeout);
62+
}
5763

5864
if (nextProps.autoIncrement && nextProps.percent >= 0 && nextProps.percent < 99) {
5965
_this.interval = setInterval(_this.increment, nextProps.intervalTime);
@@ -63,7 +69,7 @@ var ProgressBar = (function (_React$Component) {
6369
_this.setState({
6470
percent: 99.9
6571
}, function () {
66-
setTimeout(function () {
72+
_this.timeout = setTimeout(function () {
6773
_this.setState({
6874
percent: -1
6975
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-progress-bar-plus",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Progress bar component for ReactJS.",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)