From cb7547d0218310020e1d540762dde18284ff1126 Mon Sep 17 00:00:00 2001 From: Peter Hicks Date: Tue, 14 Jan 2025 11:46:44 -0800 Subject: [PATCH] fix(editor-3001): Fix empty query from starting timer (#27488) --- frontend/src/queries/nodes/DataNode/ElapsedTime.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/queries/nodes/DataNode/ElapsedTime.tsx b/frontend/src/queries/nodes/DataNode/ElapsedTime.tsx index d5e6d6a2fa8f4..1a734b86d1a70 100644 --- a/frontend/src/queries/nodes/DataNode/ElapsedTime.tsx +++ b/frontend/src/queries/nodes/DataNode/ElapsedTime.tsx @@ -64,9 +64,14 @@ function ElapsedTimeWithTimings({ } export function ElapsedTime({ showTimings }: { showTimings?: boolean }): JSX.Element | null { - const { elapsedTime, loadingStart, responseError, isShowingCachedResults, timings } = useValues(dataNodeLogic) + const { elapsedTime, loadingStart, responseError, isShowingCachedResults, timings, query } = + useValues(dataNodeLogic) const [, setTick] = useState(0) + if ('query' in query && query.query === '') { + return null + } + let time = elapsedTime if (isShowingCachedResults) { time = 0