Skip to content

Commit

Permalink
fix: Cannot read properties of undefined (reading 'description')
Browse files Browse the repository at this point in the history
Fixes: npm#5961
  • Loading branch information
vrubezhny committed Dec 13, 2022
1 parent 7018b3d commit 70e0ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/commands/ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ const getHumanOutputItem = (node, { args, color, global, long }) => {
) +
(isGitNode(node) ? ` (${node.resolved})` : '') +
(node.isLink ? ` -> ${relativePrefix}${targetLocation}` : '') +
(long ? `${EOL}${node.package.description || ''}` : '')
(long ? `${EOL}${node.package ? node.package.description || '' : ''}` : '')

return augmentItemWithIncludeMetadata(node, { label, nodes: [] })
}
Expand Down

0 comments on commit 70e0ffd

Please sign in to comment.