Skip to content

Commit

Permalink
update exam.id when saving a new quiz, after replacing route
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis committed Jun 13, 2024
1 parent 2c5f722 commit 343522a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@
},
});
} else {
if (this.$route.params.quizId === exam.id) {
return;
}
this.$router.replace({
name: PageNames.EXAM_CREATION_ROOT,
params: {
classId: this.$route.params.classId,
quizId: exam.id,
},
});
// Update the quiz with the new id - there won't be if this is a new quiz,
// this ensures the quiz is kept up-to-date since we're replacing the route
this.updateQuiz({ id: exam.id });
}
})
.catch(error => {
Expand Down

0 comments on commit 343522a

Please sign in to comment.