diff --git a/client/src/__locales/en.json b/client/src/__locales/en.json index a9f9f75b..57aad1a6 100644 --- a/client/src/__locales/en.json +++ b/client/src/__locales/en.json @@ -125,5 +125,6 @@ "found_in_known_domain_db": "Found in the known domains database.", "category_label": "Category", "rule_label": "Rule", - "filter_label": "Filter" + "filter_label": "Filter", + "unknown_filter": "Unknown filter {{filterId}}" } \ No newline at end of file diff --git a/client/src/components/Logs/index.js b/client/src/components/Logs/index.js index 0daf8cac..6d1c9ac4 100644 --- a/client/src/components/Logs/index.js +++ b/client/src/components/Logs/index.js @@ -131,7 +131,14 @@ class Logs extends Component { } else { const filterItem = Object.keys(filters) .filter(key => filters[key].id === filterId); - filterName = filters[filterItem].name; + + if (typeof filterItem !== 'undefined' && typeof filters[filterItem] !== 'undefined') { + filterName = filters[filterItem].name; + } + + if (!filterName) { + filterName = t('unknown_filter', { filterId }); + } } }