From 504c8ecb0089a84069da3ba7d6764275dfb2fc7e Mon Sep 17 00:00:00 2001 From: kchindam-infy Date: Tue, 6 May 2025 07:43:15 -0700 Subject: [PATCH] added null check to top property of node to prevent crash because of undefined --- workspaces/arborist/lib/arborist/reify.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/arborist/lib/arborist/reify.js b/workspaces/arborist/lib/arborist/reify.js index e6d719b6b3468..ae1b1dbc497ce 100644 --- a/workspaces/arborist/lib/arborist/reify.js +++ b/workspaces/arborist/lib/arborist/reify.js @@ -571,7 +571,7 @@ module.exports = cls => class Reifier extends cls { const { top } = node // if the top is not the root or workspace then we do not want to omit it - if (!top.isProjectRoot && !top.isWorkspace) { + if (top && !top.isProjectRoot && !top.isWorkspace) { continue }