Allow stored filter without options

Fixes an issue where stored filters where considered to be wrong if
their set of options was empty
This commit is contained in:
Sean Engelhardt 2019-05-23 10:10:53 +02:00
parent a403715736
commit 10684cf1cf

View File

@ -150,12 +150,7 @@ export abstract class BaseFilterListService<V extends BaseViewModel> {
return storedFilter.every(filter => {
// Interfaces do not exist at runtime. Manually check if the
// Required information of the interface are present
return (
filter.hasOwnProperty('options') &&
filter.hasOwnProperty('property') &&
filter.options.length &&
!!filter.property
);
return filter.hasOwnProperty('options') && filter.hasOwnProperty('property') && !!filter.property;
});
} else {
return false;