mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Fix crash in require.extensions (#18788)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com>
This commit is contained in:
@@ -554,6 +554,9 @@ export function ospath(path: string) {
|
||||
*/
|
||||
export async function toMatchNodeModulesAt(lockfile: any, root: string) {
|
||||
function shouldSkip(pkg: any, dep: any): boolean {
|
||||
// Band-aid as toMatchNodeModulesAt will sometimes ask this function
|
||||
// if a package depends on itself
|
||||
if (pkg?.name === dep?.name) return true;
|
||||
return (
|
||||
!pkg ||
|
||||
!pkg.resolution ||
|
||||
|
||||
Reference in New Issue
Block a user