1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-08 01:49:58 +00:00

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

This commit is contained in:
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

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()
}