(cherry picked from commit 009df4fb7a)
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
This commit is contained in:
co-authored by
Hugo Häggmark
parent
e60f34336e
commit
c270520aa9
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user