Skip to content

Commit

Permalink
Merge pull request #326 from vuejs-jp/fix/submit-function
Browse files Browse the repository at this point in the history
fix: update onSubmit function to use id for conditional check in atte…
  • Loading branch information
jiyuujin authored Aug 21, 2024
2 parents e2cc3bd + 5671757 commit 4bc5570
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/web/app/pages/namecard/[id]/edit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function onSubmit(e: Event) {
const id = {
id: attendeeDataByUserId.value?.id ?? '',
}
if (attendeeDataByUserId.value?.created_at) {
if (id.id) {
upsertAttendee('attendees', {
...id,
...newAttendee.value,
Expand All @@ -130,7 +130,9 @@ function onSubmit(e: Event) {
})
}
navigateTo(`${currentLocale.value === 'ja' ? '/' : `/${currentLocale.value}/`}namecard/${authUser.value?.id}/edit/complete/`)
navigateTo(
`${currentLocale.value === 'ja' ? '/' : `/${currentLocale.value}/`}namecard/${authUser.value?.id}/edit/complete/`,
)
}
}
</script>
Expand Down

0 comments on commit 4bc5570

Please sign in to comment.