RED-4638: fix again

This commit is contained in:
Dan Percic 2022-07-19 13:43:17 +03:00
parent d35c45dd4e
commit 666c404fc7

View File

@ -321,13 +321,14 @@ export class ConfigService {
label: key,
icon: 'red:template',
filters: [...filterValue].map(
(value: string) =>
(value?: string) =>
new NestedFilter({
// id shouldn't be undefined to work correctly
id: value ?? 'empty',
label: value ?? this._translateService.instant('filters.empty'),
}),
),
checker: (input: File, filter: INestedFilter) => filter.id === input.fileAttributes.attributeIdToValue[id],
checker: (input: File, filter: INestedFilter) => filter.id === (input.fileAttributes.attributeIdToValue[id] ?? 'empty'),
});
});