Skip to content

Commit

Permalink
Merge pull request #1 from Pranav-FP/handle-src-api-bug
Browse files Browse the repository at this point in the history
Add only the first PB entry for a given category (Resolves xTVaser#91)
  • Loading branch information
markisha64 authored Nov 21, 2024
2 parents d08010c + e2c650f commit 1e8bd96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/src-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,12 @@ async function retrievePersonalBests(
hasSubcategories(pb),
getSubcategories(pb),
);
personalBests.set(newEntry.getId(), newEntry);

// Add only the first PB entry for a given category
const entryId = newEntry.getId();
if (!personalBests.has(entryId)) {
personalBests.set(entryId, newEntry);
}
}

if (
Expand Down

0 comments on commit 1e8bd96

Please sign in to comment.