diff --git a/src/lib/storage-utils.js b/src/lib/storage-utils.js index 715037fb2..112561ac5 100644 --- a/src/lib/storage-utils.js +++ b/src/lib/storage-utils.js @@ -53,6 +53,10 @@ function normalizePackage(pkg: Package) { pkg._rev = DEFAULT_REVISION; } + if (_.isString(pkg._id) === false) { + pkg._id = pkg.name; + } + // normalize dist-tags normalizeDistTags(pkg); @@ -107,7 +111,7 @@ export function normalizeContributors(contributors: Array): Array