From 08c51a0b4a1adc60d68992edae8e40b2c5b05dd2 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Wed, 8 Feb 2023 14:39:22 +0100 Subject: [PATCH] fix(ui): fix offset check --- .../Session_/Player/Controls/components/CustomDragLayer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/Session_/Player/Controls/components/CustomDragLayer.tsx b/frontend/app/components/Session_/Player/Controls/components/CustomDragLayer.tsx index c106b14dc..c1b91412d 100644 --- a/frontend/app/components/Session_/Player/Controls/components/CustomDragLayer.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/CustomDragLayer.tsx @@ -25,7 +25,7 @@ function getItemStyles( display: "none" } } - let { x, y } = currentOffset; + let { x } = currentOffset; if (x > maxX) { x = maxX; } @@ -61,7 +61,7 @@ const CustomDragLayer: FC = memo(function CustomDragLayer({ maxX, minX, o })) useEffect(() => { - if (!isDragging || !currentOffset) { + if (!isDragging || !currentOffset?.x) { return } onDrag(currentOffset)