-
Notifications
You must be signed in to change notification settings - Fork 37
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
Integrate PouchDB #1167
Integrate PouchDB #1167
Conversation
04a9245
to
d2c2ab0
Compare
src/app/courses/courses.service.ts
Outdated
@@ -26,7 +27,7 @@ export class CoursesService { | |||
// If the id already matches what is stored on the service, return that. | |||
// Or will get new version if forceLatest set to true | |||
requestCourse({ courseId, forceLatest = false }, opts: any = {}) { | |||
if (!forceLatest && this.course && courseId === this.course._id) { | |||
if (!forceLatest && courseId === this.course._id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I added a check for this.course because it's null sometimes and gives an error when accessing the id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, if you directly go to the step view page then BehaviorSubject is null and throws an error
Ok here are some thoughts on this:
|
To test this PR, please make sure to create a database called "test" and add "pouchIndex": "courses" to the documents in the courses database. (related to #48)
What Works?