You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's related to the winners_bracket and losers_bracket promises never resolving possible? Haven't found it exaclty yet but I think that's a root cause maybe... so curSeason always = curSeason and never equals 0 cuz it never updates to lastYear's value type thing maybe?
I have tried all day to get this to some how work and I am afraid my novice skills are not good enough to figure it out!
I created a variable hasPlayoffs and set it based on the leageData pulled from sleeper and that all works.
And I submitted that value to processPlayoffs() and run an if/else inside process playoffs and if the hasPlayoffs is false I return:
I tried returning 'null' for each one, and {} for each one and nothing ever keeps me from getting stuck in an endless loop up in this area:
const { season, year } = await processRegularSeason({
leagueData,
rosters,
curSeason,
week,
regularSeason,
svelteFetch
});
//* We need to determine if this league even has playoffs or not before we try and return brackets!
let hasPlayoffs = leagueData.settings.playoff_week_start === 0 ? false : true; // continue if true.
const pS = await processPlayoffs({ hasPlayoffs, year, curSeason, week, playoffRecords, rosters, svelteFetch });
if (pS) {
playoffRecords = pS; // update the regular season records
}
//* forward the loop to the nex year here and run it again...
lastYear = year;
if (!currentYear && year) {
currentYear = year;
}
curSeason = season;
}
Where hat last curly-brace is th end of the While(curSeason && curSeason != "0") loop.
Somehow the not processing the playoffs is leaving the curSeason and the year the same forever and I can't for the life of me figure out how to update it ...
THANKS!! AMAzing code base for this novice to work with, but I think I am at my wit's end!
Hey! Sorry for the delay @JimNayzium. If you can send me where in leagueData that I can see whether a league doesn't have playoffs, I should be able to get this working.
Describe the bug
With playoffs on sleeper set to NONE the records page gets hung up.
Your League ID
972236561200799744
I think if you use my leagueID you can see what I mean.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
That it would follow logic to skip over the processPlayoffs if hte playoffs are set to none in leagueData.
THANKS for all this code base, it's really great.
The text was updated successfully, but these errors were encountered: