From b0aa84401db3ac0f587e090eada5d8e6dc7f6173 Mon Sep 17 00:00:00 2001 From: Maciej Bodek Date: Wed, 27 Nov 2024 16:29:56 +0100 Subject: [PATCH] fix: crash when all datapoints are identical --- .../web-console/src/scenes/Editor/Metrics/useGraphOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-console/src/scenes/Editor/Metrics/useGraphOptions.ts b/packages/web-console/src/scenes/Editor/Metrics/useGraphOptions.ts index aef61740f..4a3789a24 100644 --- a/packages/web-console/src/scenes/Editor/Metrics/useGraphOptions.ts +++ b/packages/web-console/src/scenes/Editor/Metrics/useGraphOptions.ts @@ -122,7 +122,7 @@ export const useGraphOptions = ({ }, y: { range: (u, min, max) => { - return [u.data[0].length > 1 ? min : 0, max] + return [u.data[0].length > 1 && min !== max ? min : 0, max] }, }, }