astashov / liftosaur

Weightlifting tracker app for coders
https://www.liftosaur.com
GNU Affero General Public License v3.0
241 stars 32 forks source link

State variables aren't being saved properly when you edit multiple at the same time during a workout. #146

Closed astashov closed 1 month ago

astashov commented 2 months ago

From Discord:

Looks like state variables aren't being saved properly when you edit multiple at the same time during a workout.

Here's a simple test program.

Run an actual workout (doesn't seem like the bug happens in the playground), hit edit, change both the repsMin and repsMax state variable values, hit save. It should update the minimum and maximum values for the rep range but only updates one of the values.

Similar thing happens if you try to update the program weight and a state variable at the same time, only 1 thing gets updated.