Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2022-08-01 21:02:18 +0300
committerGitHub <noreply@github.com>2022-08-01 21:02:18 +0300
commiteac1bf26f28e9e8fc07e1350c3d7b14a94005ebf (patch)
tree6bffad5b665a5830d2b3a1615972aab247c1fdf7 /lib
parent58cc362ceec82ddeb16311d3fb574908294ac789 (diff)
fix(ls): when filtering workspaces, make sure the edge has a to before checking if its a workspace (#5164)
Diffstat (limited to 'lib')
-rw-r--r--lib/commands/ls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/commands/ls.js b/lib/commands/ls.js
index d3932072b..073ca0c69 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
}