Skip to content

Commit 10d6734

Browse files
committed
save empty array
1 parent c12f11e commit 10d6734

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

x-pack/solutions/security/plugins/security_solution/public/common/components/endpoint/host_isolation/from_alerts/use_host_isolation_action.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ export interface UseHostIsolationActionProps {
2525
onAddIsolationStatusClick: (action: 'isolateHost' | 'unisolateHost') => void;
2626
}
2727

28+
const emptyArray: AlertTableContextMenuItem[] = [];
29+
2830
export const useHostIsolationAction = ({
2931
closePopover,
3032
detailsData,
@@ -77,7 +79,7 @@ export const useHostIsolationAction = ({
7779
return useMemo<AlertTableContextMenuItem[]>(() => {
7880
// If user has no Authz, then don't show the menu item at all
7981
if ((isHostIsolated && !canUnIsolateHost) || !canIsolateHost) {
80-
return [];
82+
return emptyArray;
8183
}
8284

8385
const menuItem: AlertTableContextMenuItem = {

0 commit comments

Comments
 (0)