-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
endTracking() fails #1
Comments
HI Frank, I will check and confirm. |
I believe this happened because you pressed the browser back button and the code is not destroying the setInterval object in
And try |
Added this check to repo too 0f0a130. |
The above code is a workaround so you can move on with the code/book. It seems that the endTracking gets called twice, the second time this.currentWorkoutLog is null -> throws the error. |
Hi,
I have at the point 3.2 When the exercices are finished, in the workout-history-tracker.services, the function endTracking() fails because :
this.currentWorkoutLog is null
If I log the finish function : there are a record:
finish this.currentWorkoutLog {"startedOn":"2018-07-11T12:23:11.776Z","completed":false,"exercicesDone":12,"lastExercise":"Side Plank"}
After te router [finish] is called but it seems the startExerciseTimeTracking is called again a second times on the window.setInterval and now the
this.currentWorkoutLog = null
And it's not possible to get the route /finish.
To resolve this problem, I add if(this.currentWorkoutLog === null) return false.
And it works.
Thanks,
Franck
The text was updated successfully, but these errors were encountered: