Skip to content

Commit

Permalink
fix(arborist): node.target can be null
Browse files Browse the repository at this point in the history
Followup to npm#7027
  • Loading branch information
ljharb committed Jan 16, 2024
1 parent f696b51 commit ba5978b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workspaces/arborist/lib/calc-dep-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const calcDepFlagsStep = (node) => {
resetParents(node, 'optional')

// for links, map their hierarchy appropriately
if (node.isLink) {
if (node.isLink && node.target) {
node.target.dev = node.dev
node.target.optional = node.optional
node.target.devOptional = node.devOptional
Expand Down

0 comments on commit ba5978b

Please sign in to comment.