Skip to content

Commit b261403

Browse files
committed
fix(arborist): node.target can be null
Followup to npm#7027
1 parent 96c957a commit b261403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workspaces/arborist/lib/calc-dep-flags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const calcDepFlagsStep = (node) => {
3030
resetParents(node, 'optional')
3131

3232
// for links, map their hierarchy appropriately
33-
if (node.isLink) {
33+
if (node.isLink && node.target) {
3434
node.target.dev = node.dev
3535
node.target.optional = node.optional
3636
node.target.devOptional = node.devOptional

0 commit comments

Comments
 (0)