File tree Expand file tree Collapse file tree 1 file changed +14
-17
lines changed
packages/router/src/unplugin/core Expand file tree Collapse file tree 1 file changed +14
-17
lines changed Original file line number Diff line number Diff line change @@ -623,23 +623,20 @@ export function collectDuplicatedRouteNodes(
623623 nodes . push ( { filePath, node } )
624624 }
625625
626- const dups = Array . from (
627- seen
628- . values ( )
629- . filter ( nodes => Object . keys ( nodes ) . length > 1 )
630- . map ( nodes =>
631- nodes . toSorted ( ( { node : a } , { node : b } ) => {
632- // put the one that takes precedence at the end of the list
633- if ( treeNodes . has ( a ) && ! treeNodes . has ( b ) ) {
634- return - 1
635- } else if ( ! treeNodes . has ( a ) && treeNodes . has ( b ) ) {
636- return 1
637- } else {
638- return 0
639- }
640- } )
641- )
642- )
626+ const dups = Array . from ( seen . values ( ) )
627+ . filter ( nodes => Object . keys ( nodes ) . length > 1 )
628+ . map ( nodes =>
629+ nodes . toSorted ( ( { node : a } , { node : b } ) => {
630+ // put the one that takes precedence at the end of the list
631+ if ( treeNodes . has ( a ) && ! treeNodes . has ( b ) ) {
632+ return - 1
633+ } else if ( ! treeNodes . has ( a ) && treeNodes . has ( b ) ) {
634+ return 1
635+ } else {
636+ return 0
637+ }
638+ } )
639+ )
643640
644641 return dups
645642}
You can’t perform that action at this time.
0 commit comments