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>
(cherry picked from commit eab806620c)
Co-authored-by: Ward Bekker <ward@wardbekker.com>
This commit is contained in:
co-authored by
Ward Bekker
parent
b5da0dcf39
commit
49e653dbaf
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user