Transformations: Fix partitionByValues when there is no match (#72981)

pull/73104/head
Ludovic Viaud 2 years ago committed by GitHub
parent 1ac9e7eaab
commit 8d79d45972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      public/app/features/transformers/partitionByValues/partitionByValues.ts

@ -98,6 +98,11 @@ export function partitionByValues(
options?: PartitionByValuesTransformerOptions
): DataFrame[] {
const keyFields = frame.fields.filter((f) => matcher(f, frame, [frame]))!;
if (!keyFields.length) {
return [frame];
}
const keyFieldsVals = keyFields.map((f) => f.values);
const names = keyFields.map((f) => f.name);

Loading…
Cancel
Save