Prioritize todays workout over the last set
When predicting the next set, if one set is from a previous workout, rather than switching to that workout we should start todays plan instead.
This commit is contained in:
parent
2729f86fb3
commit
7a7c8b20b9
|
@ -117,7 +117,7 @@ export default function SetList() {
|
||||||
const todaysWorkouts = todaysPlan[0].workouts.split(',');
|
const todaysWorkouts = todaysPlan[0].workouts.split(',');
|
||||||
let workout = todaysWorkouts[0];
|
let workout = todaysWorkouts[0];
|
||||||
console.log(`${SetList.name}.predict:`, {todaysSets, todaysWorkouts});
|
console.log(`${SetList.name}.predict:`, {todaysSets, todaysWorkouts});
|
||||||
if (todaysSets.length > 0) {
|
if (todaysWorkouts.includes(todaysSets[0].name) && todaysSets.length > 0) {
|
||||||
const count = todaysSets.filter(
|
const count = todaysSets.filter(
|
||||||
s => s.name === todaysSets[0].name,
|
s => s.name === todaysSets[0].name,
|
||||||
).length;
|
).length;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user