summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/react/components/textbox.jsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx
index 718ecbe4c..b5b696124 100644
--- a/web/react/components/textbox.jsx
+++ b/web/react/components/textbox.jsx
@@ -49,6 +49,11 @@ module.exports = React.createClass({
_onError: function() {
var errorState = getStateFromStores();
+ if (this.state.timerInterrupt != null) {
+ window.clearInterval(this.state.timerInterrupt);
+ this.setState({ timerInterrupt: null });
+ }
+
if (errorState.message === "There appears to be a problem with your internet connection") {
this.setState({ connection: " bad-connection" });
var timerInterrupt = window.setInterval(this._onTimerInterrupt, 5000);
@@ -56,10 +61,6 @@ module.exports = React.createClass({
}
else {
this.setState({ connection: "" });
- if (this.state.timerInterrupt != null) {
- window.clearInterval(this.state.timerInterrupt);
- this.setState({ timerInterrupt: null });
- }
}
},
_onTimerInterrupt: function() {