Skip to content

Commit

Permalink
fix: FilterBox JS when no results (#10143)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud authored Jun 24, 2020
1 parent 763b385 commit 4e71491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class FilterBox extends React.Component {
let vals = null;
if (options !== null) {
if (Array.isArray(options)) {
vals = options.map(opt => opt.value);
vals = options.map(opt => (typeof opt === 'string' ? opt : opt.value));
} else if (options.value) {
vals = options.value;
} else {
Expand Down Expand Up @@ -254,7 +254,7 @@ class FilterBox extends React.Component {
});
});
const { key, label } = filterConfig;
const data = this.props.filtersChoices[key];
const data = filtersChoices[key] || [];
const max = Math.max(...data.map(d => d.metric));
let value = selectedValues[key] || null;

Expand Down

0 comments on commit 4e71491

Please sign in to comment.