File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 4141 SafeMap,
4242 String,
4343 StringPrototypeIndexOf,
44+ StringPrototypeLastIndexOf,
4445 StringPrototypeMatch,
4546 StringPrototypeSlice,
4647 StringPrototypeStartsWith,
@@ -286,12 +287,13 @@ function readPackageScope(checkPath){
286287const rootSeparatorIndex = checkPath . indexOf ( path . sep ) ;
287288let separatorIndex ;
288289while (
289- ( separatorIndex = checkPath . lastIndexOf ( path . sep ) ) > rootSeparatorIndex
290+ ( separatorIndex = StringPrototypeLastIndexOf ( checkPath , path . sep ) ) >=
291+ rootSeparatorIndex
290292) {
291293checkPath = checkPath . slice ( 0 , separatorIndex ) ;
292294if ( checkPath . endsWith ( path . sep + 'node_modules' ) )
293295return false ;
294- const pjson = readPackage ( checkPath ) ;
296+ const pjson = readPackage ( checkPath + path . sep ) ;
295297if ( pjson ) return {
296298path : checkPath ,
297299data : pjson
You can’t perform that action at this time.
0 commit comments