feat: revise fileGraph discover

This commit is contained in:
Chen, Tai-Lin committed 2023-08-28 17:53:52 +08:00
1 parent 3c41764f85
commit 02e1219228
2 files changed
+60 -17

No files matched your search

+6 -2
View File
@@ -30,9 +30,13 @@ export default class FileGraph {
// Overwrite the file graph with the provided files
// Remove file nodes that don't exist anymore and add new ones
eventFiles.forEach((file) => {
this.root.merge(file)
const newNode = new FileNode(eventFiles[0])
eventFiles.slice(1).forEach((file) => {
newNode.addChild(file, { makeParents: true })
})
this.root.merge(newNode)
}
handleEvent(event) {