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>
This commit is contained in:
co-authored by
Piotr Jamróz
parent
6730558f8c
commit
003a85949e
@@ -2,7 +2,7 @@ import _ from 'lodash';
|
|||||||
|
|
||||||
export default class ResponseParser {
|
export default class ResponseParser {
|
||||||
parse(query: string, results: { results: any }) {
|
parse(query: string, results: { results: any }) {
|
||||||
if (!results || results.results.length === 0) {
|
if (!results?.results || results.results.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user