diff options
author | isaacs <i@izs.me> | 2020-11-11 04:26:14 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-11-13 22:22:56 +0300 |
commit | a8aa38513ad5c4ad44e6bb3e1499bfc40c31e213 (patch) | |
tree | f3d0d0868fe9a42cbf0db910c52b2acc6a9ec1d0 /lib/utils | |
parent | 1dbf0f9bb26ba70f4c6d0a807701d7652c31d7d4 (diff) |
explain-dep: handle shortening edge from root project
Fixes: #2134
Credit: @isaacs
Close: #2156
Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/explain-dep.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/explain-dep.js b/lib/utils/explain-dep.js index 096df97ed..ed69a02c1 100644 --- a/lib/utils/explain-dep.js +++ b/lib/utils/explain-dep.js @@ -64,7 +64,7 @@ const explainDependents = ({ name, dependents }, depth, color) => { const maxLen = 50 const showNames = [] for (let i = max; i < dependents.length; i++) { - const { from: { name } } = dependents[i] + const { from: { name = 'the root project' } } = dependents[i] len += name.length if (len >= maxLen && i < dependents.length - 1) { showNames.push('...') |