From bf44da6eb6d682c503e1ed86bc70dc540495e72b Mon Sep 17 00:00:00 2001 From: "xuying.xu" Date: Wed, 21 Feb 2024 14:38:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20parentNode=E6=9C=AA=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/react/src/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/react/src/index.tsx b/packages/react/src/index.tsx index 4d6d20443..60bfa223e 100644 --- a/packages/react/src/index.tsx +++ b/packages/react/src/index.tsx @@ -82,6 +82,10 @@ class ReactCanvas extends React.Component { super(props); const { canvasRef } = props; this.canvasRef = canvasRef || React.createRef(); + this.parentNode = { + width: 0, + height: 0, + }; } getProps = () => {