Skip to content

Commit 8d655e6

Browse files
committed
fix(mr tree): duplicate issue.
1 parent 2a60909 commit 8d655e6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/tree/mr-tree.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ export class MRItem extends ListItem<IMRData> {
199199
}
200200

201201
private _insert(node: IFileNode, nodes: IFileNode[]) {
202-
const hasSameRootNode = nodes.find(i => i.path === node.path);
203-
204202
for (const i of nodes) {
205203
if (i.parentPath === node.parentPath) {
204+
const hasSameRootNode = nodes.find(j => j.path === node.path);
206205
if (hasSameRootNode) {
207206
break;
208207
}

0 commit comments

Comments
 (0)