Skip to content

Commit

Permalink
fix: 解决工具切换时onInactive不存在问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Yan Heng committed Aug 2, 2023
1 parent 9ed1092 commit a1c83f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class App extends BaseService<EventArgs> {

public setTool(curTool: Tool): void {
const oldTool = this.currentTool;
if (oldTool) {
if (oldTool && typeof oldTool.onInactive === 'function') {
oldTool.onInactive(this);
}
this.currentTool = curTool;
Expand Down

0 comments on commit a1c83f9

Please sign in to comment.