Skip to content

Commit

Permalink
Update bookmarks handler to reference lessonId, and add extra conditi…
Browse files Browse the repository at this point in the history
…onal check in lesson resource selection page
  • Loading branch information
marcellamaki committed Nov 30, 2021
1 parent 0564d16 commit 782baaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,11 @@ export function showLessonResourceBookmarks(store, params) {
});
});
}
export function showLessonResourceBookmarksMain(store) {
export function showLessonResourceBookmarksMain(store, params) {
return store.dispatch('loading').then(() => {
getBookmarks().then(bookmarks => {
return showResourceSelectionPage(store, {
lessonId: params.lessonId,
bookmarksList: bookmarks[0],
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@
}
},
addToSelectedResources(content) {
const list = this.contentList.length ? this.contentList : this.bookmarksList;
const list =
this.contentList && this.contentList.length ? this.contentList : this.bookmarksList;
this.addToResourceCache({
node: list.find(n => n.id === content.id),
});
Expand Down

0 comments on commit 782baaf

Please sign in to comment.