From 5d34bf55f973e47f03ff5903b9ec8ed7b3e4c404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=A9=E6=B5=A9?= Date: Wed, 12 Jun 2024 15:07:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E4=BF=AE=E5=A4=8D=20resize=20?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=9C=A8=E6=9F=90=E4=BA=9B=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hoc/resizable.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }) ) }