Skip to content

Commit

Permalink
Updating format to fit on one line
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas committed May 23, 2018
1 parent 9110b41 commit d955c13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions superset/assets/src/explore/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ export function getControlsState(state, form_data) {
delete control.mapStateToProps;
}

if (control.multi && typeof formData[k] === 'string') {
formData[k] = [formData[k]];
}
formData[k] = (control.multi && formData[k] && !Array.isArray(formData[k])) ? [formData[k]]
: formData[k];

// If the value is not valid anymore based on choices, clear it
if (control.type === 'SelectControl' && control.choices && k !== 'datasource' && formData[k]) {
Expand Down

0 comments on commit d955c13

Please sign in to comment.