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 Dec 16, 2023
1 parent 86ac76c commit d6826f1
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 d6826f1

Please sign in to comment.