diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx index e11142b58b..d98d3131c0 100644 --- a/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx +++ b/invokeai/frontend/web/src/features/nodes/components/flow/Flow.tsx @@ -157,11 +157,13 @@ export const Flow = () => { }, []); const onMouseMove = useCallback((event: MouseEvent) => { - const pos = $flow.get()?.screenToFlowPosition({ - x: event.clientX, - y: event.clientY, - }); - cursorPosition.current = pos; + if (flowWrapper.current?.getBoundingClientRect()) { + const pos = $flow.get()?.screenToFlowPosition({ + x: event.clientX, + y: event.clientY, + }); + cursorPosition.current = pos; + } }, []); // #region Updatable Edges