diff --git a/workspaces/arborist/lib/calc-dep-flags.js b/workspaces/arborist/lib/calc-dep-flags.js index 45ed9562479af..e6bdf6c8467ac 100644 --- a/workspaces/arborist/lib/calc-dep-flags.js +++ b/workspaces/arborist/lib/calc-dep-flags.js @@ -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