mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Prevent exception when panel has multiple queries (#49368)
This fixes the issues that when a panel has multiple queries this throws an exception if source is not part of the current frame Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
parent
bb4a834ee3
commit
eab806620c
@ -41,7 +41,8 @@ function addExtractedFields(frame: DataFrame, options: ExtractFieldsOptions): Da
|
||||
}
|
||||
const source = findField(frame, options.source);
|
||||
if (!source) {
|
||||
throw new Error('json field not found');
|
||||
// this case can happen when there are multiple queries
|
||||
return frame;
|
||||
}
|
||||
|
||||
const ext = fieldExtractors.getIfExists(options.format ?? FieldExtractorID.Auto);
|
||||
|
Loading…
Reference in New Issue
Block a user