fix: broken list

This commit is contained in:
2025-03-17 02:26:17 +00:00
parent af4929a5b3
commit fe1a32f31b
7 changed files with 23 additions and 20 deletions

View File

@ -46,9 +46,11 @@ export const needsUpdate = (pkg: Package | undefined) => {
return l1 < r1;
};
export const hasFeature = (pkg: Package, feature: Feature) => {
export const hasFeature = (pkg: Package | undefined, feature: Feature) => {
return (
pkg !== undefined &&
pkg.loc !== null &&
pkg.loc !== undefined &&
typeof pkg.loc?.status !== 'string' &&
pkg.loc.status.OK & feature
);