Skip to content

Commit

Permalink
[hotfix] dashboard won't load, error in fields.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Feb 17, 2017
1 parent 5bb8713 commit fe377e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/assets/javascripts/explorev2/stores/fields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const fields = {
multi: true,
label: 'Metrics',
validators: [v.nonEmpty],
default: field => field.choices !== null ? [field.choices[0][0]] : null,
default: field => field.choices && field.choices.length > 0 ? [field.choices[0][0]] : null,
mapStateToProps: (state) => ({
choices: (state.datasource) ? state.datasource.metrics_combo : [],
}),
Expand Down

0 comments on commit fe377e8

Please sign in to comment.