File tree 1 file changed +9
-3
lines changed
packages/client/src/composables
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -356,15 +356,21 @@ export function parseGraphRawData(modules: ModuleInfo[], root: string) {
356
356
}
357
357
358
358
const uniqueDeps = getUniqueDeps ( mod . deps , ( dep ) => {
359
+ node . edges . push ( getEdge ( mod . id , dep ) )
359
360
// save references
360
361
if ( ! moduleReferences . has ( dep ) )
361
362
moduleReferences . set ( dep , [ ] )
362
- moduleReferences . get ( dep ) ! . push ( {
363
+ const moduleReferencesValue = moduleReferences . get ( dep ) !
364
+ const displayPath = removeRootPath ( path )
365
+ const isExist = ! ! ( moduleReferencesValue . find ( item => item . path === path && item . displayPath === displayPath && item . mod . id === mod . id ) )
366
+ if ( isExist )
367
+ return
368
+
369
+ moduleReferencesValue . push ( {
363
370
path,
364
- displayPath : removeRootPath ( path ) ,
371
+ displayPath,
365
372
mod,
366
373
} )
367
- node . edges . push ( getEdge ( mod . id , dep ) )
368
374
} )
369
375
mod . deps = uniqueDeps
370
376
graphNodesTotal . value . push ( node )
You can’t perform that action at this time.
0 commit comments