Skip to content

Commit

Permalink
fix for creating an aspect from the admin page with empty ranges (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgraff2 authored and annyhe committed Jun 15, 2017
1 parent 44958ee commit 11d8f6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions view/admin/utils/getFormData.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,14 @@ function getFormData(form, aspectRangeFormat, propertyMetaData) {

for (let i = inputsAndSelects.length - ONE; i >= ZERO; i--) {

// add all values together, wkthout duplicates
// add all values together, without duplicates
if (inputsAndSelects[i].name &&
!jsonData.hasOwnProperty(inputsAndSelects[i].name)) {

// do not include radio button values
jsonData[inputsAndSelects[i].name] = inputsAndSelects[i].value;
if (inputsAndSelects[i].type !== 'radio') {
jsonData[inputsAndSelects[i].name] = inputsAndSelects[i].value;
}
}
}

Expand Down

0 comments on commit 11d8f6c

Please sign in to comment.