diff --git a/CHANGELOG.md b/CHANGELOG.md
index a50f04b42e..4c9174757a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.
+## [1.3.3] - 2022-05-29
+
+### Fixed
+
+- Empty points were causing a bug in the rankings page. Also, the standings page is throwing an undefined in the preseason. [issue #119](https://github.com/nmelhado/league-page/issues/119)
+
## [1.3.2] - 2022-05-20
### Fixed
diff --git a/package-lock.json b/package-lock.json
index 0e91a66319..e8695b2ead 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,11 @@
{
"name": "league-page",
- "version": "1.3.2",
+ "version": "1.3.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "version": "1.3.2",
+ "version": "1.3.3",
"license": "MIT",
"dependencies": {
"@smui/button": "6.0.0-beta.13",
diff --git a/package.json b/package.json
index a1974b8e07..1bda93520e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "league-page",
- "version": "1.3.2",
+ "version": "1.3.3",
"homepage": "https://github.com/nmelhado/league-page",
"repository": {
"type": "git",
diff --git a/src/lib/Standings/index.svelte b/src/lib/Standings/index.svelte
index 22121795c3..a65a33e234 100644
--- a/src/lib/Standings/index.svelte
+++ b/src/lib/Standings/index.svelte
@@ -84,7 +84,7 @@
}
-
{year} {leagueName} Standings
+{year ?? ''} {leagueName} Standings
{#if loading}
diff --git a/src/lib/utils/helperFunctions/leagueRecords.js b/src/lib/utils/helperFunctions/leagueRecords.js
index 4378954cc8..0dbedea477 100644
--- a/src/lib/utils/helperFunctions/leagueRecords.js
+++ b/src/lib/utils/helperFunctions/leagueRecords.js
@@ -92,7 +92,7 @@ export const getLeagueRecords = async (refresh = false) => {
rS
} = await processRegularSeason({leagueData, users, rosters, curSeason, week, regularSeason})
- regularSeason = rS; // update the regular season records
+ regularSeason = rS; // update the regular season record
// post season data
const pS = await processPlayoffs({year, originalManagers, curSeason, week, playoffRecords})
@@ -493,7 +493,7 @@ const digestBracket = ({bracket, playoffRecords, playoffRounds, matchupDifferent
const newMatchup = {...matchup}
let points = 0;
for(const k in newMatchup.points) {
- points += newMatchup.points[k].reduce((t, nV) => t + nV);
+ points += newMatchup.points[k].reduce((t, nV) => t + nV, 0);
}
newMatchup.points = points;
matchupWeek.push(newMatchup);
diff --git a/src/lib/utils/helperFunctions/universalFunctions.js b/src/lib/utils/helperFunctions/universalFunctions.js
index 7f9a67b9ff..61505e0ec9 100644
--- a/src/lib/utils/helperFunctions/universalFunctions.js
+++ b/src/lib/utils/helperFunctions/universalFunctions.js
@@ -7,6 +7,11 @@ export const cleanName = (name) => {
}
export const round = (num) => {
+ if(typeof(num) =="string") {
+ num = parseFloat(num)
+ }
+ // console.log(num + Number.EPSILON)
+ // console.log((num + Number.EPSILON) * 100)
return (Math.round((num + Number.EPSILON) * 100) / 100).toFixed(2);
}
diff --git a/src/lib/version.js b/src/lib/version.js
index cd8c348684..d57225ade7 100644
--- a/src/lib/version.js
+++ b/src/lib/version.js
@@ -5,4 +5,4 @@ available for your copy of League Page
*/
// Keep in sync with package.json
-export const version = "1.3.2";
+export const version = "1.3.3";