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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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',
);