From 7071d0c4be05bc08cd51861165b83aa170836965 Mon Sep 17 00:00:00 2001 From: Maciej Bodek Date: Mon, 16 Dec 2024 13:13:10 +0100 Subject: [PATCH] Fix: spuriously appearing `zoom to data` --- packages/web-console/src/scenes/Editor/Metrics/metric.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/web-console/src/scenes/Editor/Metrics/metric.tsx b/packages/web-console/src/scenes/Editor/Metrics/metric.tsx index 58760067d..63a07786c 100644 --- a/packages/web-console/src/scenes/Editor/Metrics/metric.tsx +++ b/packages/web-console/src/scenes/Editor/Metrics/metric.tsx @@ -132,9 +132,9 @@ export const Metric = ({ if (responses[1] && responses[1].type === QuestDB.Type.DQL) { const lastNotNull = responses[1].data[0] as LastNotNull - if (lastNotNull) { - setLastNotNull(new Date(lastNotNull.created).getTime()) - } + setLastNotNull( + lastNotNull ? new Date(lastNotNull.created).getTime() : undefined, + ) } } catch (err) { console.error(err)