1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-31 02:39:38 +02:00

Fix duplicate visited regions

This commit is contained in:
Sean Morley 2024-08-17 08:07:50 -04:00
parent 175a2371b1
commit 96663bb17b
3 changed files with 13 additions and 0 deletions

View file

@ -9,6 +9,11 @@
console.log(data);
let numRegions: number = regions.length;
visitedRegions = visitedRegions.filter(
(visitedRegion, index, self) =>
index === self.findIndex((t) => t.region === visitedRegion.region)
);
let numVisitedRegions: number = visitedRegions.length;
</script>