Skip to content

Commit

Permalink
feat(core): 销毁时调用所有插件的 destroy 方法
Browse files Browse the repository at this point in the history
  • Loading branch information
ZivvW authored and DymoneLewis committed Feb 20, 2025
1 parent 309b096 commit 3837c1c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/LogicFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,12 @@ export class LogicFlow {
this.graphModel.destroy()
this.tool.destroy()
this.history.destroy()
for (const extensionName in this.extension) {
const extensionInstance = this.extension[extensionName]
if ('destroy' in extensionInstance) {
extensionInstance.destroy?.()
}
}
}
}

Expand Down

0 comments on commit 3837c1c

Please sign in to comment.