Skip to content
Snippets Groups Projects
Commit d08475c1 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix crash on custom aggregations

parent e4956d44
Branches
Tags
No related merge requests found
......@@ -127,13 +127,16 @@ export default class AggregationWidget extends Component {
render() {
const { aggregation, addButton, name } = this.props;
if (aggregation && aggregation.length > 0) {
let aggregationName = NamedClause.isNamed(aggregation)
? NamedClause.getName(aggregation)
: AggregationClause.isCustom(aggregation)
? this.renderCustomAggregation()
: AggregationClause.isMetric(aggregation)
? this.renderMetricAggregation()
: this.renderStandardAggregation();
let aggregationName;
try {
aggregationName = NamedClause.isNamed(aggregation)
? NamedClause.getName(aggregation)
: AggregationClause.isCustom(aggregation)
? this.renderCustomAggregation()
: AggregationClause.isMetric(aggregation)
? this.renderMetricAggregation()
: this.renderStandardAggregation();
} catch (e) {}
return (
<div
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment