commit: edcd6982a5add96fa4390b0d18de0b0a104df1d4
parent 95b06cacea5e4bd832f826ec9ef642267e546e78
Author: tusooa <tusooa@kazv.moe>
Date: Wed, 5 Apr 2023 23:36:52 -0400
Fix poll duration unit
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/components/poll/poll_form.js b/src/components/poll/poll_form.js
@@ -28,19 +28,19 @@ export default {
computed: {
pollType: {
get () { return pollFallback(this.modelValue, 'pollType') },
- set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, pollType: newVal }) }
+ set (newVal) { this.modelValue.pollType = newVal }
},
options: {
get () { return pollFallback(this.modelValue, 'options') },
- set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, options: newVal }) }
+ set (newVal) { this.modelValue.options = newVal }
},
expiryAmount: {
get () { return pollFallback(this.modelValue, 'expiryAmount') },
- set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, expiryAmount: newVal }) }
+ set (newVal) { this.modelValue.expiryAmount = newVal }
},
expiryUnit: {
get () { return pollFallback(this.modelValue, 'expiryUnit') },
- set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, expiryUnit: newVal }) }
+ set (newVal) { this.modelValue.expiryUnit = newVal }
},
pollLimits () {
return this.$store.state.instance.pollLimits
@@ -98,7 +98,7 @@ export default {
},
addOption () {
if (this.options.length < this.maxOptions) {
- this.options = [...this.options, '']
+ this.options.push('')
return true
}
return false
@@ -106,7 +106,6 @@ export default {
deleteOption (index, event) {
if (this.options.length > 2) {
this.options.splice(index, 1)
- this.options = [...this.options]
}
},
convertExpiryToUnit (unit, amount) {