diff --git a/src/hoc/resizable.tsx b/src/hoc/resizable.tsx index 293ba4963..54c9cd90c 100644 --- a/src/hoc/resizable.tsx +++ b/src/hoc/resizable.tsx @@ -78,8 +78,8 @@ export default (Origin: React.ComponentType) => immer(draft => { x += draft.x y += draft.y - if (this.active!.indexOf('x') >= 0) draft.x = x - if (this.active!.indexOf('y') >= 0) draft.y = y + if (this.active && this.active.indexOf('x') >= 0) draft.x = x + if (this.active && this.active.indexOf('y') >= 0) draft.y = y }) ) }