InfluxDB: Fix Cannot read property 'length' of undefined in when parsing response (#32504)

* Fix Cannot read property 'length' of undefined in Influx

* Update public/app/plugins/datasource/influxdb/response_parser.ts

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Update public/app/plugins/datasource/influxdb/response_parser.ts

* Revert to original solution

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
pull/32511/head
Ivana Huckova 4 years ago committed by GitHub
parent 6730558f8c
commit 003a85949e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/app/plugins/datasource/influxdb/response_parser.ts

@ -2,7 +2,7 @@ import _ from 'lodash';
export default class ResponseParser {
parse(query: string, results: { results: any }) {
if (!results || results.results.length === 0) {
if (!results?.results || results.results.length === 0) {
return [];
}

Loading…
Cancel
Save