chore: update all deps (#1976)
This commit is contained in:
parent
3acf87d5b6
commit
189d358b2a
20 changed files with 1730 additions and 2078 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue