Skip to content

Commit 3837c1c

Browse files
ZivvWDymoneLewis
authored andcommitted
feat(core): 销毁时调用所有插件的 destroy 方法
1 parent 309b096 commit 3837c1c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/core/src/LogicFlow.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,12 @@ export class LogicFlow {
13911391
this.graphModel.destroy()
13921392
this.tool.destroy()
13931393
this.history.destroy()
1394+
for (const extensionName in this.extension) {
1395+
const extensionInstance = this.extension[extensionName]
1396+
if ('destroy' in extensionInstance) {
1397+
extensionInstance.destroy?.()
1398+
}
1399+
}
13941400
}
13951401
}
13961402

0 commit comments

Comments
 (0)