Skip to content
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

cannot set property #12

Open
coleman07 opened this issue Dec 17, 2019 · 1 comment
Open

cannot set property #12

coleman07 opened this issue Dec 17, 2019 · 1 comment

Comments

@coleman07
Copy link

No description provided.

@coleman07
Copy link
Author

This error occurs in the ngOnDestroy method contained in the workout-runner-component. At the end of the exercises, startExerciseTimeTracking calls this.tracker.endTracking(true). In that method, currentWorkoutLog is set to null. When the app navigates to finish, the destroy method is called which calls endTracking but currentWorkoutLog is null so the first line causes an error since you are assigning the value of completed to a null. To fix it, I enclosed the entire body of endTracking in an if(this.currentWorkoutLog) clause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant