Skip to content

Commit

Permalink
fix(dashboard): Fix FilterWithDataMask typing and add null check (#22260
Browse files Browse the repository at this point in the history
)
  • Loading branch information
codyml committed Nov 29, 2022
1 parent fb3e717 commit a642d12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export type Filter = {
description: string;
};

export type FilterWithDataMask = Filter & { dataMask: DataMaskWithId };
export type FilterWithDataMask = Filter & { dataMask?: DataMaskWithId };

export type Divider = Partial<Omit<Filter, 'id' | 'type'>> & {
id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const FilterControls: FC<FilterControlsProps> = ({
const activeOverflowedFiltersInScope = useMemo(
() =>
overflowedFiltersInScope.filter(
filter => isNativeFilter(filter) && filter.dataMask.filterState?.value,
filter => isNativeFilter(filter) && filter.dataMask?.filterState?.value,
).length,
[overflowedFiltersInScope],
);
Expand Down

0 comments on commit a642d12

Please sign in to comment.