chore: update all deps (#1976)

This commit is contained in:
Anthony Fu 2023-04-12 14:35:35 +02:00 committed by GitHub
parent 3acf87d5b6
commit 189d358b2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 1730 additions and 2078 deletions

View file

@ -19,11 +19,11 @@ const { client } = $(useMasto())
async function vote(e: Event) {
const formData = new FormData(e.target as HTMLFormElement)
const choices = formData.getAll('choices') as string[]
const choices = formData.getAll('choices').map(i => +i) as number[]
// Update the poll optimistically
for (const [index, option] of poll.options.entries()) {
if (choices.includes(String(index)))
if (choices.includes(index))
option.votesCount = (option.votesCount || 0) + 1
}
poll.voted = true