Skip to content

Commit

Permalink
Merge d9e120e into af3ec66
Browse files Browse the repository at this point in the history
  • Loading branch information
ipostol committed Jun 27, 2016
2 parents af3ec66 + d9e120e commit 20d08a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/loading_bar.js
Expand Up @@ -11,7 +11,7 @@ export class LoadingBar extends React.Component {

this.state = {
percent: 0,
interval: null,
interval: null
}

this.boundSimulateProgress = this.simulateProgress.bind(this)
Expand All @@ -34,7 +34,7 @@ export class LoadingBar extends React.Component {
const percent = this.state.percent

if (!interval) {
interval = setInterval(this.boundSimulateProgress, UPDATE_TIME)
interval = setInterval(this.boundSimulateProgress, this.props.updateTime || UPDATE_TIME)
}

this.setState({ percent, interval })
Expand All @@ -48,8 +48,8 @@ export class LoadingBar extends React.Component {
clearInterval(interval)
interval = null
percent = 0
} else if (percent < MAX_PROGRESS) {
percent = percent + PROGRESS_INCREASE
} else if (percent < (this.props.maxProgress || MAX_PROGRESS)) {
percent = percent + (this.props.progressIncrease || PROGRESS_INCREASE)
}

this.setState({ percent, interval })
Expand Down

0 comments on commit 20d08a4

Please sign in to comment.