diff --git a/package-lock.json b/package-lock.json index 6ff820a9..0650ec27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bundesliga", - "version": "1.4.0", + "version": "1.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bundesliga", - "version": "1.4.0", + "version": "1.4.1", "dependencies": { "@emotion/react": "11.10.0", "@emotion/styled": "11.10.0", diff --git a/package.json b/package.json index b1edcae4..9508cbc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bundesliga", - "version": "1.4.0", + "version": "1.4.1", "private": true, "scripts": { "dev": "export NODE_ENV=development; npm install; node scripts/entrypoint.mjs & next dev", diff --git a/scripts/entrypoint.mjs b/scripts/entrypoint.mjs index e3b172e0..0b81273a 100644 --- a/scripts/entrypoint.mjs +++ b/scripts/entrypoint.mjs @@ -252,9 +252,12 @@ async function update() { time - 10, ]); } else { - console.log(`Predicting start of matchday in ${time} seconds`); - // Makes sure to wait until the time is done - setTimeout(updateData, time * 1000 + 1); + // Makes sure that the amount of time left in the transfer is not unknown + if (time !== 0) { + console.log(`Predicting start of matchday in ${time} seconds`); + // Makes sure to wait until the time is done + setTimeout(updateData, time * 1000 + 1); + } } } else { if (time - 11 > 0) { @@ -266,8 +269,11 @@ async function update() { time - 10, ]); } else { - console.log(`Predicting end of matchday in ${time} seconds`); - setTimeout(updateData, time * 1000 + 1); + // Makes sure that the amount of time left in the matchday is not unknown + if (time !== 0) { + console.log(`Predicting end of matchday in ${time} seconds`); + setTimeout(updateData, time * 1000 + 1); + } } } }