0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-04-08 02:54:13 -05:00

fix(store): internal error when checking manifest (#5123)

This commit is contained in:
Marc Bernard 2025-03-08 14:39:53 +01:00 committed by GitHub
parent 7e48ac6cde
commit 83dbde5154
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@verdaccio/store': patch
---
fix(store): internal error when checking manifest

View file

@ -387,7 +387,11 @@ export function hasDeprecatedVersions(pkgInfo: Manifest): boolean {
}
export function isDeprecatedManifest(manifest: Manifest): boolean {
return hasDeprecatedVersions(manifest) && Object.keys(manifest._attachments).length === 0;
return (
hasDeprecatedVersions(manifest) &&
(typeof manifest._attachments === 'undefined' ||
Object.keys(manifest._attachments).length === 0)
);
}
export function mapManifestToSearchPackageBody(