mirror of
https://github.com/grafana/grafana.git
synced 2024-11-22 08:56:43 -06:00
Variables: Fixes Unsupported data format error for null values (#32480)
This commit is contained in:
parent
f0d6f132ae
commit
009df4fb7a
@ -290,6 +290,8 @@ describe('areMetricFindValues', () => {
|
||||
${[{ text: { foo: 1 } }]} | ${false}
|
||||
${[{ text: Symbol('foo') }]} | ${false}
|
||||
${[{ text: true }]} | ${false}
|
||||
${[{ text: null }]} | ${true}
|
||||
${[{ value: null }]} | ${true}
|
||||
${[]} | ${true}
|
||||
${[{ text: '' }]} | ${true}
|
||||
${[{ Text: '' }]} | ${true}
|
||||
|
@ -193,7 +193,11 @@ export function areMetricFindValues(data: any[]): data is MetricFindValue[] {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeof firstValue[firstValueKey] !== 'string' && typeof firstValue[firstValueKey] !== 'number') {
|
||||
if (
|
||||
firstValue[firstValueKey] !== null &&
|
||||
typeof firstValue[firstValueKey] !== 'string' &&
|
||||
typeof firstValue[firstValueKey] !== 'number'
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user