fix: null exception from adhoc metric popover (#13955)

This commit is contained in:
Grace Guo
2021-04-05 22:36:59 -07:00
committed by GitHub
parent f3becbeb4f
commit 4b29789b64

View File

@@ -318,7 +318,7 @@ export default class AdhocMetricEditPopover extends React.PureComponent {
option.filterBy.toLowerCase().indexOf(input.toLowerCase()) >= 0,
};
if (this.props.datasourceType === 'druid') {
if (this.props.datasourceType === 'druid' && aggregateSelectProps.options) {
aggregateSelectProps.options = aggregateSelectProps.options.filter(
aggregate => aggregate !== 'AVG',
);