From 08e474dd48115a649138f93cf9407cfb16a94ba0 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Tue, 12 Feb 2019 23:30:54 +0100 Subject: [PATCH] Don't abort when executing empty expression Signed-off-by: Julius Volz --- src/App.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.js b/src/App.js index 511deed59e..eddbd92c9f 100755 --- a/src/App.js +++ b/src/App.js @@ -210,6 +210,10 @@ class Panel extends Component { } executeQuery = ()=> { + if (this.state.expr === '') { + return; + } + if (this.abortInFlightFetch) { this.abortInFlightFetch(); this.abortInFlightFetch = null; @@ -219,10 +223,6 @@ class Panel extends Component { this.abortInFlightFetch = () => abortController.abort(); this.setState({loading: true}); - if (this.state.expr === '') { - return; - } - let endTime = this.getEndTime() / 1000; let startTime = endTime - this.state.range; let resolution = this.state.resolution || Math.max(Math.floor(this.state.range / 250), 1);