Skip to content

Commit

Permalink
Add only the first PB entry for a given category (Resolves xTVaser#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
GMPranav committed Nov 11, 2024
1 parent d08010c commit e2c650f
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 e2c650f

Please sign in to comment.