diff --git a/src/container/NodeRenderer/index.tsx b/src/container/NodeRenderer/index.tsx index 002b015a..40ebb906 100644 --- a/src/container/NodeRenderer/index.tsx +++ b/src/container/NodeRenderer/index.tsx @@ -83,14 +83,14 @@ function Node({ const childRect = useMemo(() => getRectOfNodes(childNodes), [childNodes]); const isParentNode = !!childNodes.length; - node.style = useMemo(() => { + const style = useMemo(() => { if (isParentNode) { return { ...node.style, width: Math.floor(childRect.width) + 20, height: Math.floor(childRect.height) + 20, boxSizing: 'border-box', - }; + } as React.CSSProperties; } return node.style; }, [childRect.width, childRect.height, isParentNode, node.style]); @@ -111,7 +111,7 @@ function Node({