diff --git a/ui/src/shared/components/FieldList.js b/ui/src/shared/components/FieldList.js index 161e42e343..8577edeec3 100644 --- a/ui/src/shared/components/FieldList.js +++ b/ui/src/shared/components/FieldList.js @@ -79,9 +79,14 @@ const FieldList = React.createClass({ }, render() { - const {query, isKapacitorRule, isInDataExplorer} = this.props - const hasAggregates = query.fields.some(f => f.funcs && f.funcs.length) - const hasGroupByTime = query.groupBy.time + const { + query: {fields = [], groupBy}, + isKapacitorRule, + isInDataExplorer, + } = this.props + + const hasAggregates = fields.some(f => f.funcs && f.funcs.length) + const hasGroupByTime = groupBy.time return (
@@ -90,7 +95,7 @@ const FieldList = React.createClass({ {hasAggregates ?