From d8840827614531d6aaa4a258b19231214f6fe15c Mon Sep 17 00:00:00 2001 From: tusooa Date: Wed, 5 Apr 2023 22:56:39 -0400 Subject: [PATCH] Fix adding/removing poll options --- src/components/poll/poll_form.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/poll/poll_form.js b/src/components/poll/poll_form.js index 951b9454..a533e2b8 100644 --- a/src/components/poll/poll_form.js +++ b/src/components/poll/poll_form.js @@ -98,7 +98,7 @@ export default { }, addOption () { if (this.options.length < this.maxOptions) { - this.options.push('') + this.options = [...this.options, ''] return true } return false @@ -106,7 +106,7 @@ export default { deleteOption (index, event) { if (this.options.length > 2) { this.options.splice(index, 1) - this.updatePollToParent() + this.options = [...this.options] } }, convertExpiryToUnit (unit, amount) { @@ -121,9 +121,6 @@ export default { Math.max(this.minExpirationInCurrentUnit, this.expiryAmount) this.expiryAmount = Math.min(this.maxExpirationInCurrentUnit, this.expiryAmount) - this.updatePollToParent() - }, - updatePollToParent () { } } }