feat: put other in end

This commit is contained in:
TrèsAbhi committed 2024-02-06 13:34:23 -06:00
1 parent 939acad30c
commit 059358cff4
1 file changed
+6 -5
+6 -5
View File
@@ -183,11 +183,12 @@ export const TIER_ROMAN_NUMERALS: Record<Tier, string> = {
}; };
export const NATIONS = tanksDefinitionsArray.then((tanks) => { export const NATIONS = tanksDefinitionsArray.then((tanks) => {
const nationsObject: Record<string, true> = {}; const nations = Array.from(
new Set<string>(Object.values(tanks).map((tank) => tank.nation)),
);
tanks.forEach(({ nation }) => { nations.splice(nations.indexOf('other'), 1);
nationsObject[nation] = true; nations.push('other');
});
return Object.keys(nationsObject); return nations;
}); });