Skip to content

Commit

Permalink
[D4C] Fix to unused selector badge showing when selector used as excl…
Browse files Browse the repository at this point in the history
…ude (#156122)

## Summary

Defend for containers (policy UI) fix:
- Fix to unused selector badge showing when selector used as exclude
  • Loading branch information
mitodrummer committed Apr 27, 2023
1 parent 0832ae2 commit 69755a9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,9 @@ export const ControlGeneralView = ({ policy, onChange, show }: ViewDeps) => {
</EuiFlexItem>

{selectors.map((selector, i) => {
const usedByResponse = !!responses.find((response) =>
response.match.includes(selector.name)
const usedByResponse = !!responses.find(
(response) =>
response.match.includes(selector.name) || response?.exclude?.includes(selector.name)
);

return (
Expand Down

0 comments on commit 69755a9

Please sign in to comment.