Skip to content

Commit 9f733d9

Browse files
committed
fix typo
fix upcoming draft bug fix upcoming draft bug (#346) fix bad commit
1 parent 7767cc7 commit 9f733d9

7 files changed

Lines changed: 16 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [2.5.1] - 2025-02-11
6+
7+
### Fixed
8+
9+
- The upcoming drafts weren't showing the traded players. This happened because of a type mismatch (int vs string).
10+
511
## [2.5.0] - 2025-02-08
612

713
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Generate a custom league page for your Sleeper fantasy football league in just a
103103
## To deploy on [Vercel](https://vercel.com/) for free:
104104
- Push up your changes
105105
- [Link your github repo to Vercel](https://vercel.com/guides/deploying-svelte-with-vercel#step-2:-deploying-your-svelte-app-with-vercel)
106-
- (Optional) If you want to add analytics, go to the [Analytics page in Vercel](https://vercel. They will start tracking after the next deployment.com/d?to=%2F%5Bteam%5D%2F%5Bproject%5D%2Fanalytics&title=Open+Web+Analytics) and turn them on!
106+
- (Optional) If you want to add analytics, go to the [Analytics page in Vercel](https://vercel.com/d?to=%2F%5Bteam%5D%2F%5Bproject%5D%2Fanalytics&title=Open+Web+Analytics) and turn them on! They will start tracking after the next deployment.
107107
- That's it!
108108

109109
<!-- ## Development

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "league-page",
3-
"version": "2.5.0",
3+
"version": "2.5.1",
44
"homepage": "https://github.com/nmelhado/league-page",
55
"repository": {
66
"type": "git",

src/lib/Drafts/Draft.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
onMount(loadAccuracy);
1717
1818
function loadAccuracy() {
19-
if(!accuracy) return;
19+
if(!accuracy || accuracy === 1) return;
2020
let timer;
2121
progress = 0;
2222
closed = false;
2323
clearInterval(timer);
2424
timer = setInterval(() => {
25-
progress += 0.01;
25+
progress += 0.02;
2626
if (progress >= accuracy) {
2727
clearInterval(timer);
2828
if (progress >= 1) {
@@ -107,7 +107,7 @@
107107
}
108108
</style>
109109

110-
{#if accuracy && !closed}
110+
{#if accuracy && accuracy !== 1 && !closed}
111111
<div class="accuracy">
112112
<div class="accuracyText">
113113
Upcomig draft order accuracy: {parseInt(progress*100)}%

src/lib/utils/helperFunctions/leagueDrafts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ const buildFromScratch = (rosters, previousOrder, rounds, picks, regularSeasonLe
9999
}
100100

101101
for(const pick of picks) {
102-
if(pick.owner_id == pick.roster_id || pick.round > rounds) continue;
103-
draft[pick.round - 1][draftOrder.indexOf(pick.roster_id)] = pick.owner_id;
102+
if(pick.owner_id === pick.roster_id || pick.round > rounds) continue;
103+
draft[pick.round - 1][draftOrder.indexOf(pick.roster_id.toString())] = pick.owner_id;
104104
}
105105

106106
let accuracy = (progression + 1) / (regularSeasonLength + 1);

src/lib/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ available for your copy of League Page
55
*/
66

77
// Keep in sync with package.json
8-
export const version = "2.5.0";
8+
export const version = "2.5.1";

0 commit comments

Comments
 (0)