Change function to filter by era due to change of value type

This commit is contained in:
WoodyXP 2023-07-12 16:41:55 +02:00
parent b48f74f879
commit 75c897eb5b

View File

@ -41,13 +41,9 @@ export class UnitDatabase {
getEras() {
var eras: string[] = [];
for (let unit in this.blueprints) {
var unitEras = this.blueprints[unit].era;
if (unitEras) {
for (let era of unitEras) {
if (era !== "" && !eras.includes(era))
eras.push(era);
}
}
var era = this.blueprints[unit].era;
if (era && era !== "" && !eras.includes(era))
eras.push(era);
}
return eras;
}