Skip to content

Commit

Permalink
fix: parentNode未初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
xuying.xu committed Feb 21, 2024
1 parent 14d456e commit bf44da6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ class ReactCanvas extends React.Component<CanvasProps> {
super(props);
const { canvasRef } = props;
this.canvasRef = canvasRef || React.createRef();
this.parentNode = {
width: 0,
height: 0,
};
}

getProps = () => {
Expand Down

0 comments on commit bf44da6

Please sign in to comment.