From b07d434bf3a47d5594d8f7c31de306b713197b1a Mon Sep 17 00:00:00 2001 From: Kfir Dayan Date: Mon, 21 Aug 2023 09:35:44 +0300 Subject: [PATCH] fixing posponded games --- dist/GameSource.js | 4 ++++ src/GameSource.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dist/GameSource.js b/dist/GameSource.js index d375b3c..507d0ea 100644 --- a/dist/GameSource.js +++ b/dist/GameSource.js @@ -28,6 +28,9 @@ class GameSource { const headerSplit = gameHeader.split(","); // In data, if there is no time, it means it's the last game for the calender const lastGameForCalender = headerSplit.length < 4; + const location = headerSplit[headerSplit.length - 1].trim(); + if (location === 'נדחה') + continue; if (lastGameForCalender) break; const gameDate = this.findDate(headerSplit); @@ -50,6 +53,7 @@ class GameSource { }, }); } + // return []; return games; } findTime(headerSplit) { diff --git a/src/GameSource.ts b/src/GameSource.ts index 11384a8..9c1dd14 100644 --- a/src/GameSource.ts +++ b/src/GameSource.ts @@ -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 const lastGameForCalender = headerSplit.length < 4; + const location = headerSplit[headerSplit.length - 1].trim(); + if (location === 'נדחה') continue; if (lastGameForCalender) break; - + const gameDate = this.findDate(headerSplit); const gameTime = this.findTime(headerSplit); @@ -57,6 +59,7 @@ export default class GameSource { }, }); } + // return []; return games; }