Skip to content

Commit

Permalink
Don't add split part of UI if we have one series (elastic#109483)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
VladLasitsa and kibanamachine committed Aug 30, 2021
1 parent 709bc13 commit d946e69
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export function visWithSplits(WrappedComponent) {
[model, palettesService, syncColors, visData]
);

if (!model || !visData || !visData[model.id]) return <WrappedComponent {...props} />;
if (!model || !visData || !visData[model.id] || visData[model.id].series.length === 1)
return <WrappedComponent {...props} />;
if (visData[model.id].series.every((s) => s.id.split(':').length === 1)) {
return <WrappedComponent {...props} />;
}
Expand Down

0 comments on commit d946e69

Please sign in to comment.