Skip to content

Commit

Permalink
fix: remove useless branch code
Browse files Browse the repository at this point in the history
  • Loading branch information
renanfranca committed Feb 14, 2025
1 parent d6ed03f commit 7798657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/webapp/app/module/domain/ModuleRankStatistics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const toModuleRankStatistics = (landscape: Landscape): ModuleRankStatisti
.flatMap(element => element.allModules())
.reduce(
(counts, module) => {
const currentCount = counts.get(module.rank()) || 0;
const currentCount = counts.get(module.rank())!;
counts.set(module.rank(), currentCount + 1);
return counts;
},
Expand All @@ -20,6 +20,6 @@ export const toModuleRankStatistics = (landscape: Landscape): ModuleRankStatisti

return RANKS.map(rank => ({
rank,
quantity: rankCounts.get(rank) ?? 0,
quantity: rankCounts.get(rank)!,
}));
};

0 comments on commit 7798657

Please sign in to comment.