fix(ui): do no create extraneous pos var

This commit is contained in:
psychedelicious 2023-12-28 20:42:36 +11:00
parent f6664960ca
commit 1b8651fa26

View File

@ -158,11 +158,10 @@ export const Flow = () => {
const onMouseMove = useCallback((event: MouseEvent<HTMLDivElement>) => {
if (flowWrapper.current?.getBoundingClientRect()) {
const pos = $flow.get()?.screenToFlowPosition({
cursorPosition.current = $flow.get()?.screenToFlowPosition({
x: event.clientX,
y: event.clientY,
});
cursorPosition.current = pos;
}
}, []);