Oznaczenia statusu postoju w sekcji maszynistów na stacji

This commit is contained in:
2020-09-13 23:54:12 +02:00
parent 1c329d9ea9
commit acb4f03b7f
3 changed files with 83 additions and 37 deletions
+5 -2
View File
@@ -325,13 +325,16 @@ export default class Store extends VuexModule {
// Dodawanie do listy online potencjalnych scenerii niewpisanych do bazy
updatedStationList.forEach(updatedStation => {
const alreadyInList: any = this.stationList.findIndex(station => station.stationName === updatedStation.stationName);
const alreadyInList: any = this.stationList.some(station => station.stationName === updatedStation.stationName);
if (alreadyInList < 0) {
if (!alreadyInList) {
this.stationList.push({
...updatedStation,
scheduledTrains: [],
stationTrains: [],
online: true,
reqLevel: '-1',
nonPublic: true,
});
}
});