Fixing the checking filters for incidents from the store (#1311)

# What this PR does

Fix the bug related with clearing the filters when coming back from
Incident page

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/482

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
This commit is contained in:
Yulia Shanyrova 2023-02-20 15:16:14 +01:00 committed by GitHub
parent 78e1cbabab
commit dd3e21b3a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,8 +66,8 @@ class IncidentsFilters extends Component<IncidentsFiltersProps, IncidentsFilters
if (isEmpty(values)) {
// TODO fill filters if no filters in query
let newQuery;
if (store.incidentFilters) {
newQuery = { ...store.incidentFilters };
if (store.alertGroupStore.incidentFilters) {
newQuery = { ...store.alertGroupStore.incidentFilters };
} else {
newQuery = {
status: [IncidentStatus.Firing, IncidentStatus.Acknowledged],