mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
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 [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user