From 4984d1b01410e045424dfaa668a0ce59bfaa70d7 Mon Sep 17 00:00:00 2001 From: Simon He <57086651+Simon-He95@users.noreply.github.com> Date: Sun, 18 Aug 2024 15:27:34 +0800 Subject: [PATCH] fix(components): tree nodesMap leak (#10195) Co-authored-by: qiang --- packages/components/tree/src/model/tree-store.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/tree/src/model/tree-store.ts b/packages/components/tree/src/model/tree-store.ts index d5ec368d30..f3215fde4b 100644 --- a/packages/components/tree/src/model/tree-store.ts +++ b/packages/components/tree/src/model/tree-store.ts @@ -103,6 +103,7 @@ export default class TreeStore { setData(newVal: TreeData): void { const instanceChanged = newVal !== this.root.data if (instanceChanged) { + this.nodesMap = {} this.root.setData(newVal) this._initDefaultCheckedNodes() } else {