fix: Display patches using new patches JSON format

This commit is contained in:
oSumAtrIX
2023-10-05 04:55:47 +02:00
parent e290b7c4fd
commit 3c6b6d23f5
4 changed files with 28 additions and 26 deletions

View File

@@ -10,7 +10,8 @@ import type {
DonationPlatform,
CryptoWallet,
Social,
Info
Info,
CompatiblePackage
} from '$lib/types';
export type ReposData = { repositories: Repository[] };
@@ -44,7 +45,7 @@ async function patches(): Promise<PatchesData> {
// gets packages and patch count
for (let i = 0; i < json.patches.length; i++) {
json.patches[i].compatiblePackages.forEach((pkg: Patch) => {
json.patches[i].compatiblePackages?.forEach((pkg: CompatiblePackage) => {
packagesWithCount[pkg.name] = (packagesWithCount[pkg.name] || 0) + 1;
});
}