Commit 80ae5e0c authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

clearTimeout also on network errors

parent 239e97e3
Pipeline #3266 passed with stage
in 1 minute and 39 seconds
......@@ -621,7 +621,10 @@ class LtlRewrite extends React.Component {
this.setState({ result: <SVGInline svg={res['svg']}/> });
else
this.setState({ result: null});
}).catch(error => this.setState({ result: <pre>{error.message}</pre> }));
}).catch(error => {
clearTimeout(this.timer);
this.setState({ result: <pre>{error.message}</pre> });
});
}
componentDidMount() {
......@@ -770,7 +773,10 @@ class LtlStudy extends React.Component {
res => {
this.props.handleAnyParseError(res);
this.setState({ result: this.buildResult(res) });
}).catch(error => this.setState({ result: <pre>{error.message}</pre> }));
}).catch(error => {
clearTimeout(this.timer);
this.setState({ result: <pre>{error.message}</pre> });
});
}
componentDidMount() {
......@@ -872,7 +878,10 @@ class LtlTranslate extends React.Component {
res => {
this.props.handleAnyParseError(res);
this.setState({ result: this.buildResult(res) });
}).catch(error => this.setState({ result: () => <pre>{error.message}</pre> }));
}).catch(error => {
clearTimeout(this.timer);
this.setState({ result: () => <pre>{error.message}</pre> });
});
}
componentDidMount() {
......@@ -1100,8 +1109,10 @@ class LtlCompare extends React.Component {
res => {
this.handleAnyParseError(res);
this.setState({ result: this.buildResult(res) });
}).catch(error => this.setState({ result: <pre>{error.message}</pre> }));
}).catch(error => {
clearTimeout(this.timer);
this.setState({ result: <pre>{error.message}</pre> });
});
}
componentDidMount() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment