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)