diff --git a/public/app/features/explore/state/query.ts b/public/app/features/explore/state/query.ts index e4eee245df3..f8b75a541c6 100644 --- a/public/app/features/explore/state/query.ts +++ b/public/app/features/explore/state/query.ts @@ -471,7 +471,12 @@ export const runQueries = ( console.error(error); }, complete() { - dispatch(changeLoadingStateAction({ exploreId, loadingState: LoadingState.Done })); + // In case we don't get any response at all but the observable completed, make sure we stop loading state. + // This is for cases when some queries are noop like running first query after load but we don't have any + // actual query input. + if (getState().explore[exploreId]!.queryResponse.state === LoadingState.Loading) { + dispatch(changeLoadingStateAction({ exploreId, loadingState: LoadingState.Done })); + } }, });