diff --git a/frontend/components/side_panels/HostSidePanel/HostSidePanel.jsx b/frontend/components/side_panels/HostSidePanel/HostSidePanel.jsx index 070d25651e..98dfd1b588 100644 --- a/frontend/components/side_panels/HostSidePanel/HostSidePanel.jsx +++ b/frontend/components/side_panels/HostSidePanel/HostSidePanel.jsx @@ -41,7 +41,9 @@ class HostSidePanel extends Component { const { onFilterLabels } = this; const allHostLabels = filter(labels, { type: 'all' }); const hostStatusLabels = filter(labels, { type: 'status' }); - const hostPlatformLabels = filter(labels, { type: 'platform' }); + const hostPlatformLabels = filter(labels, (label) => { + return label.type === 'platform' && label.count > 0; + }); const customLabels = filter(labels, (label) => { const lowerDisplayText = label.display_text.toLowerCase(); @@ -78,7 +80,7 @@ class HostSidePanel extends Component { selectedLabel={selectedLabel} type="platform" /> -
+ {hostPlatformLabels.length > 0 &&
}
LABELS