File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/components/QuestionTypes Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 169169 },
170170
171171 _toggleAnswer (option ) {
172+ const optionValue = option .choiceValue ()
173+
172174 option .toggle ()
173175
174176 if (this .question .multiple ) {
175177 this .enterPressed = false
176178
177179 if (! option .selected ) {
178- this ._removeAnswer (option . choiceValue () )
179- } else {
180- this .dataValue .push (option . choiceValue () )
180+ this ._removeAnswer (optionValue )
181+ } else if ( this . dataValue . indexOf (optionValue) === - 1 ) {
182+ this .dataValue .push (optionValue )
181183 }
182184 } else {
183- this .dataValue = option .selected ? option . choiceValue () : null
185+ this .dataValue = option .selected ? optionValue : null
184186 }
185187
186188 if (this .isValid () && this .question .nextStepOnAnswer && ! this .question .multiple ) {
You can’t perform that action at this time.
0 commit comments