Skip to content

Commit 47e2a56

Browse files
committed
Add explicit null check in pnpm utilities
1 parent a978db9 commit 47e2a56

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/utils/pnpm.mts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export async function extractPurlsFromPnpmLockfile(
4343
...(pkg as any).devDependencies,
4444
}
4545
for (const depName in deps) {
46-
const ref = deps[depName]!
46+
const ref = deps[depName]
47+
if (!ref) {
48+
continue
49+
}
4750
const subKey = isPnpmDepPath(ref) ? ref : `/${depName}@${ref}`
4851
visit(subKey)
4952
}

0 commit comments

Comments
 (0)