From dd33a23c479e0efce2542319cfb5264b71734d7d Mon Sep 17 00:00:00 2001 From: Montana Date: Wed, 9 Jan 2019 10:19:27 -0500 Subject: [PATCH] Fix off by one error --- js/components/multi_checkbox_input.js | 7 +------ templates/components/multi_checkbox_input.html | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/js/components/multi_checkbox_input.js b/js/components/multi_checkbox_input.js index 6235d4af..6ab3e050 100644 --- a/js/components/multi_checkbox_input.js +++ b/js/components/multi_checkbox_input.js @@ -31,7 +31,7 @@ export default { validationError: this.initialErrors.join(' '), otherChecked: this.initialValue.includes("other") ? true : this.otherChecked, otherText: this.initialOtherValue, - selections: this.setSelection() + selections: this.initialValue } }, @@ -48,10 +48,5 @@ export default { this.otherChecked = !this.otherChecked this.otherText = '' }, - setSelection: function () { - for (let choice of this.initialValue) { - this.selections.push(choice) - } - } } } diff --git a/templates/components/multi_checkbox_input.html b/templates/components/multi_checkbox_input.html index 9a9543df..cb9b37d2 100644 --- a/templates/components/multi_checkbox_input.html +++ b/templates/components/multi_checkbox_input.html @@ -33,7 +33,7 @@
  • {% if choice[0] != 'other' %} - + {% else %}