File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -90,17 +90,19 @@ function findNodeFromPath(referencePath, allData) {
90
90
const isReferenceRemoteURL = stringIsAValidUrl ( referencePath ) ,
91
91
partialComponents = referencePath . split ( localPointer ) ,
92
92
isPartial = partialComponents . length > 1 ;
93
- if ( isPartial && ! isReferenceRemoteURL ) {
94
- referencePath = partialComponents . slice ( 0 , partialComponents . length - 1 ) . join ( '#' ) ;
95
- }
96
93
97
94
let node = allData . find ( ( node ) => {
95
+ if ( isPartial && ! isReferenceRemoteURL ) {
96
+ referencePath = partialComponents [ 0 ] ;
97
+ }
98
+
98
99
if ( isReferenceRemoteURL ) {
99
100
return _ . startsWith ( node . path , referencePath ) ;
100
101
}
101
102
102
103
return comparePaths ( node . fileName , referencePath ) ;
103
104
} ) ;
105
+
104
106
return node ;
105
107
}
106
108
You can’t perform that action at this time.
0 commit comments