Skip to content

Commit

Permalink
refactor: add possible missing undefined type
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Jan 19, 2021
1 parent ac692d6 commit fc87c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/common/src/services/filter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ export class FilterService {
}

// find the filter object and call its clear method with true (the argument tells the method it was called by a clear filter)
const colFilter: Filter = this._filtersMetadata.find((filter: Filter) => filter.columnDef.id === columnId);
if (colFilter && colFilter.clear) {
const colFilter: Filter | undefined = this._filtersMetadata.find((filter: Filter) => filter.columnDef.id === columnId);
if (colFilter?.clear) {
colFilter.clear(true);
}

Expand Down

0 comments on commit fc87c45

Please sign in to comment.