From a1c83f947bf05cb47681f759f7e68bd8f1a27a35 Mon Sep 17 00:00:00 2001 From: Yan Heng Date: Wed, 2 Aug 2023 11:09:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E6=97=B6onInactive=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/app.ts b/packages/core/src/app.ts index 41b4dcfc..0f172bb9 100644 --- a/packages/core/src/app.ts +++ b/packages/core/src/app.ts @@ -59,7 +59,7 @@ export class App extends BaseService { public setTool(curTool: Tool): void { const oldTool = this.currentTool; - if (oldTool) { + if (oldTool && typeof oldTool.onInactive === 'function') { oldTool.onInactive(this); } this.currentTool = curTool;