Fixed logs page crush on filter removing

Closes #479
This commit is contained in:
Ildar Kamalov 2018-12-17 11:28:44 +03:00
parent 1c89e1df32
commit 717a58a872
2 changed files with 10 additions and 2 deletions

View File

@ -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}}"
}

View File

@ -131,8 +131,15 @@ class Logs extends Component {
} else {
const filterItem = Object.keys(filters)
.filter(key => filters[key].id === filterId);
if (typeof filterItem !== 'undefined' && typeof filters[filterItem] !== 'undefined') {
filterName = filters[filterItem].name;
}
if (!filterName) {
filterName = t('unknown_filter', { filterId });
}
}
}
if (isFiltered) {