fix(ui): wrong polls are removed (#2720)

zio/stable
lazzzis 2024-03-29 21:18:33 -07:00 committed by GitHub
parent 42aeb8fa35
commit 28514e956d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -87,7 +87,9 @@ function editPollOptionDraft(event: Event, index: number) {
}
function deletePollOption(index: number) {
draft.value.params.poll!.options = draft.value.params.poll!.options.slice().splice(index, 1)
const newPollOptions = draft.value.params.poll!.options.slice()
newPollOptions.splice(index, 1)
draft.value.params.poll!.options = newPollOptions
trimPollOptions()
}