From 2fa265ff2e8ccfac60aeec41db150705615b6e1f Mon Sep 17 00:00:00 2001 From: palashgdev Date: Wed, 15 Feb 2023 16:03:53 +0530 Subject: [PATCH] fix: onDrag is updated (#2267) --- frontend/src/container/GridGraphLayout/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/container/GridGraphLayout/index.tsx b/frontend/src/container/GridGraphLayout/index.tsx index 8b85557bfe..2d57c98eda 100644 --- a/frontend/src/container/GridGraphLayout/index.tsx +++ b/frontend/src/container/GridGraphLayout/index.tsx @@ -77,7 +77,9 @@ function GridGraph(props: Props): JSX.Element { const startTimestamp = Math.trunc(start); const endTimestamp = Math.trunc(end); - dispatch(UpdateTimeInterval('custom', [startTimestamp, endTimestamp])); + if (startTimestamp !== endTimestamp) { + dispatch(UpdateTimeInterval('custom', [startTimestamp, endTimestamp])); + } }, [dispatch], );