Merge pull request #3134 from influxdata/handle-no-fields-for-measurement

handle no fields for a measurement gracefully
pull/3138/head
Brandon Farmer 2018-04-04 18:02:18 -07:00 committed by GitHub
commit 93e20eaad6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -125,8 +125,13 @@ class FieldList extends Component {
console.error('Error parsing fields keys: ', errors)
}
const newFields = _.get(fieldSets, measurement, []).map(f => ({
value: f,
type: 'field',
}))
this.setState({
fields: fieldSets[measurement].map(f => ({value: f, type: 'field'})),
fields: newFields,
})
})
}