diff --git a/lib/commands/ls.js b/lib/commands/ls.js index d3932072b7d34..073ca0c6992e8 100644 --- a/lib/commands/ls.js +++ b/lib/commands/ls.js @@ -92,7 +92,7 @@ class LS extends ArboristWorkspaceCmd { } if (this.npm.flatOptions.includeWorkspaceRoot - && !edge.to.isWorkspace) { + && edge.to && !edge.to.isWorkspace) { return true }