diff --git a/src/hooks/useNodeDimensions.ts b/src/hooks/useNodeDimensions.ts index 798de902..9cd512bb 100644 --- a/src/hooks/useNodeDimensions.ts +++ b/src/hooks/useNodeDimensions.ts @@ -16,8 +16,8 @@ function useNodeDimensions(id: string): Rect | null { return { ...nodeItem.positionAbsolute, - width: nodeItem.width, - height: nodeItem.height, + width: nodeItem.width ?? 0, + height: nodeItem.height ?? 0, }; }, [id] diff --git a/src/types/nodes.ts b/src/types/nodes.ts index e8155c45..9b876467 100644 --- a/src/types/nodes.ts +++ b/src/types/nodes.ts @@ -104,8 +104,6 @@ export type NodeDimensionUpdate = { }; export type NodeInternalsItem = Node & { - width: number; - height: number; positionAbsolute: XYPosition; z: number; handleBounds?: NodeHandleBounds;