fixed empty filter error
This commit is contained in:
parent
3b6c76a37f
commit
0d5f2f9484
@ -19,6 +19,7 @@ import ButtonRemoveFilter
|
||||
import BgpCommunityLabel
|
||||
from 'app/components/routes/BgpCommunityLabel';
|
||||
|
||||
|
||||
const AppliedCommunity = ({group, filter, onRemove}) => {
|
||||
const removeFilter = useCallback(() => {
|
||||
onRemove([group, filter.value]);
|
||||
@ -39,6 +40,10 @@ const AppliedCommunity = ({group, filter, onRemove}) => {
|
||||
const createCommunityOption = (group) => ({filter}) => {
|
||||
const name = useReadableCommunity(filter.value);
|
||||
|
||||
if (filter.value.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const cls = `select-bgp-community-0-${filter.value[0]} ` +
|
||||
`select-bgp-community-1-${filter.value[1]} ` +
|
||||
`select-bgp-community-2-${filter.value[2]}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user