Skip to content

Commit

Permalink
fix: empty responses object in thanks
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Jul 15, 2023
1 parent b9b31e9 commit 60cc3f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pages/thanks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ const eligibleForLuckyDraw = computed(() => {
})
const progresses = computed(() => {
if (!responses.value) {
return {
booths: 0,
workshops: 0,
}
}
return {
booths: responses.value.filter(x => !x.survey.workshop).length / 2 * 100,
workshops: responses.value.filter(x => x.survey.workshop).length / 1 * 100,
Expand Down

0 comments on commit 60cc3f2

Please sign in to comment.