diff options
Diffstat (limited to 'deps/npm/lib/utils/module-name.js')
-rw-r--r-- | deps/npm/lib/utils/module-name.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/deps/npm/lib/utils/module-name.js b/deps/npm/lib/utils/module-name.js index 89957b181f..18f54e4118 100644 --- a/deps/npm/lib/utils/module-name.js +++ b/deps/npm/lib/utils/module-name.js @@ -21,6 +21,7 @@ function isNotEmpty (str) { var unknown = 0 function moduleName (tree) { + if (tree.name) { return tree.name } var pkg = tree.package || tree if (isNotEmpty(pkg.name) && typeof pkg.name === 'string') return pkg.name.trim() var pkgName = pathToPackageName(tree.path) |