fixing posponded games
This commit is contained in:
parent
5588c999a7
commit
b07d434bf3
2 changed files with 8 additions and 1 deletions
4
dist/GameSource.js
vendored
4
dist/GameSource.js
vendored
|
@ -28,6 +28,9 @@ class GameSource {
|
||||||
const headerSplit = gameHeader.split(",");
|
const headerSplit = gameHeader.split(",");
|
||||||
// In data, if there is no time, it means it's the last game for the calender
|
// In data, if there is no time, it means it's the last game for the calender
|
||||||
const lastGameForCalender = headerSplit.length < 4;
|
const lastGameForCalender = headerSplit.length < 4;
|
||||||
|
const location = headerSplit[headerSplit.length - 1].trim();
|
||||||
|
if (location === 'נדחה')
|
||||||
|
continue;
|
||||||
if (lastGameForCalender)
|
if (lastGameForCalender)
|
||||||
break;
|
break;
|
||||||
const gameDate = this.findDate(headerSplit);
|
const gameDate = this.findDate(headerSplit);
|
||||||
|
@ -50,6 +53,7 @@ class GameSource {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// return [];
|
||||||
return games;
|
return games;
|
||||||
}
|
}
|
||||||
findTime(headerSplit) {
|
findTime(headerSplit) {
|
||||||
|
|
|
@ -29,9 +29,11 @@ export default class GameSource {
|
||||||
|
|
||||||
// In data, if there is no time, it means it's the last game for the calender
|
// In data, if there is no time, it means it's the last game for the calender
|
||||||
const lastGameForCalender = headerSplit.length < 4;
|
const lastGameForCalender = headerSplit.length < 4;
|
||||||
|
const location = headerSplit[headerSplit.length - 1].trim();
|
||||||
|
|
||||||
|
if (location === 'נדחה') continue;
|
||||||
if (lastGameForCalender) break;
|
if (lastGameForCalender) break;
|
||||||
|
|
||||||
const gameDate = this.findDate(headerSplit);
|
const gameDate = this.findDate(headerSplit);
|
||||||
const gameTime = this.findTime(headerSplit);
|
const gameTime = this.findTime(headerSplit);
|
||||||
|
|
||||||
|
@ -57,6 +59,7 @@ export default class GameSource {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// return [];
|
||||||
return games;
|
return games;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue