Skip to content

Commit

Permalink
error handling at fetching the content node
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOXDi committed Feb 6, 2025
1 parent 406f138 commit ebb7e9d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export default function useFetchContentNode(contentId) {
ContentNodeResource.fetchModel({
id: contentId,
getParams: { no_available_filtering: true },
}).then(node => {
if (node != null) {
})
.then(node => {
loading.value = false;
contentNode.value = node;

Expand All @@ -23,10 +23,10 @@ export default function useFetchContentNode(contentId) {
if (node.assessmentmetadata) {
questions.value = node.assessmentmetadata.assessment_item_ids;
}
} else {
loading.value = false;
}
});
})
.catch(error => {
this.$store.dispatch('handleApiError', { error });
});
};

fetchContentNode();
Expand Down

0 comments on commit ebb7e9d

Please sign in to comment.