Skip to content

Commit

Permalink
fix(core/instance): use fragment on non-UP health code path (#7555)
Browse files Browse the repository at this point in the history
Turns out that the `<OverlayTrigger>` component needs whatever you give it as children to be a single node. With the change introduced in #7520, the code path that runs when the health status is `UP` works fine, but any non-UP status hits the `<OverlayTrigger>` path and blows up/fails to render because there's two root nodes. This just wraps those two nodes in a fragment.
  • Loading branch information
Erik Munson authored and mergify[bot] committed Oct 23, 2019
1 parent 8088211 commit 4ae63f4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ export class InstanceLoadBalancerHealth extends React.Component<IInstanceLoadBal
const tooltip = <Tooltip id={name}>{tooltipText}</Tooltip>;
return (
<OverlayTrigger placement="left" overlay={tooltip}>
{healthDiv}
{ipAddress && healthCheckPath && healthCheckLinkSpan}
<>
{healthDiv}
{ipAddress && healthCheckPath && healthCheckLinkSpan}
</>
</OverlayTrigger>
);
}
Expand Down

0 comments on commit 4ae63f4

Please sign in to comment.