8000 Fix crash on weird `npms` data · zikunw/unifiedjs.github.io@deadad5 · GitHub
[go: up one dir, main page]

Skip to content

Commit deadad5

Browse files
committed
Fix crash on weird npms data
1 parent cafdccc commit deadad5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crawl/ecosystem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ async function getPackage(ctx) {
563563
const latest = body.collected.metadata.version || null
564564
const repos = body.collected.metadata.repository
565565
const url = (repos && repos.url) || ''
566-
const dependents = body.collected.npm.dependentsCount || 0
566+
const dependents = (body.collected.npm || {}).dependentsCount || 0
4640 567567
const score = body.score.final || 0
568568

569569
if (deprecated) {

0 commit comments

Comments
 (0)
0