mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: merge middle part
This commit is contained in:
1 parent
a66de4dfe1
commit
1b51346eb9
2 files changed
+62
-19
No files matched your search
@@ -63,9 +63,11 @@ export default class FileNode extends File {
|
||||
})
|
||||
|
||||
// If a child exists in this node but not in the provided node, remove it
|
||||
this.children = this.children.filter((child) =>
|
||||
fileNode.children.some((c) => c.path === child.path)
|
||||
)
|
||||
if (fileNode.children.length > 0) {
|
||||
this.children = this.children.filter((child) =>
|
||||
fileNode.children.some((c) => c.path === child.path)
|
||||
)
|
||||
}
|
||||
} else if (this.contains(fileNode)) {
|
||||
const childNode = this.children.find((child) => child.contains(fileNode))
|
||||
if (childNode) {
|
||||
|
||||
Reference in new issue
Block a user