Skip to content

Commit

Permalink
Fix AdhocFilterControl for single metric options (apache#5012)
Browse files Browse the repository at this point in the history
  • Loading branch information
michellethomas authored and Grace Guo committed May 15, 2018
1 parent 6acfbdd commit 7bddad1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export default class AdhocFilterControl extends React.Component {
optionsForSelect(props) {
const options = [
...props.columns,
...[...props.formData.metrics, props.formData.metric].map(metric => (
...[...(props.formData.metrics || []), props.formData.metric].map(metric => (
metric && (
typeof metric === 'string' ?
{ saved_metric_name: metric } :
Expand Down

0 comments on commit 7bddad1

Please sign in to comment.