Skip to content

Commit

Permalink
Fix potential duplication of dashboard index patterns when using the …
Browse files Browse the repository at this point in the history
…same pattern in control group and panel
  • Loading branch information
ThomThomson committed Oct 24, 2021
1 parent 23542eb commit c6732dc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export const syncDashboardIndexPatterns = ({
if (!embeddableIndexPatterns) return;
panelIndexPatterns.push(...embeddableIndexPatterns);
});
if (container.controlGroup) {
panelIndexPatterns.push(...(container.controlGroup.getOutput().dataViews ?? []));
}
panelIndexPatterns = uniqBy(panelIndexPatterns, 'id');

/**
Expand All @@ -51,9 +54,6 @@ export const syncDashboardIndexPatterns = ({
) {
return;
}
if (container.controlGroup) {
panelIndexPatterns.push(...(container.controlGroup.getOutput().dataViews ?? []));
}
return panelIndexPatterns;
}),
distinctUntilChanged((a, b) =>
Expand Down

0 comments on commit c6732dc

Please sign in to comment.