Skip to content
Snippets Groups Projects
Commit 9ddc3758 authored by Sameer Al-Sakran's avatar Sameer Al-Sakran
Browse files

dont try to get the short name of a null

parent df675901
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,8 @@ export default class AggregationWidget extends Component {
const fieldId = AggregationClause.getField(aggregation);
let selectedAggregation = getAggregator(AggregationClause.getOperator(aggregation));
if (!_.findWhere(tableMetadata.aggregation_options, { short: selectedAggregation.short })) {
console.log("Selected Aggregation", selectedAggregation)
if (selectedAggregation && !_.findWhere(tableMetadata.aggregation_options, { short: selectedAggregation.short })) {
// if this table doesn't support the selected aggregation, prompt the user to select a different one
selectedAggregation = null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment