From d597f0710142795c2cd2df787600e3afcb1da042 Mon Sep 17 00:00:00 2001 From: Andrew Watkins Date: Wed, 30 Aug 2017 13:28:15 -0700 Subject: [PATCH] Fix DE freezing up when there is no field list --- ui/src/shared/components/FieldList.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ui/src/shared/components/FieldList.js b/ui/src/shared/components/FieldList.js index 161e42e34..8577edeec 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 ?