Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
Fix soft-reload clearInterval.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Sep 17, 2018
1 parent a9ecf20 commit a4e0ea0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/core/Reloader.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ class Reloader extends React.Component {
return;
}
if (reloadRequest.content.reloadHash !== this.state.hash) {
window.clearInterval(this._intervalId);
if (reloadRequest.content.hard
|| reloadRequest.content.packages.length !== this.state.length
|| !R.all(R.map(x => R.contains(x, this.state.packages),
Expand Down Expand Up @@ -83,9 +82,10 @@ class Reloader extends React.Component {
// we just change the hash.
this.setState({
hash: reloadRequest.content.reloadHash
})
});
}
} else {
window.clearInterval(this.state.intervalId);
dispatch({'type': 'RELOAD'});
}
}
Expand Down

0 comments on commit a4e0ea0

Please sign in to comment.