fix: onDrag is updated (#2267)

This commit is contained in:
palashgdev 2023-02-15 16:03:53 +05:30 committed by GitHub
parent dca0b11acd
commit 2fa265ff2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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],
);