aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pipes
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2/pipes')
-rw-r--r--catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts b/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts
index b67f42d4df..29b21cb6da 100644
--- a/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts
+++ b/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts
@@ -135,11 +135,11 @@ export class EntityFilterPipe implements PipeTransform{
// --------------------------------------------------------------------------
if (filter.selectedModels && filter.selectedModels.length > 0) {
let filteredModels = [];
- let defaultModelPresent = filter.selectedModels.indexOf(DEFAULT_MODEL_NAME) > -1;
+ let allSelectedModels = [].concat.apply([], filter.selectedModels);
angular.forEach(filteredComponents, (component:Component):void => {
- if (filter.selectedModels.indexOf(component.model) > -1) {
+ if (component.model && allSelectedModels.indexOf(component.model) > -1) {
filteredModels.push(component);
- } else if (!component.model && defaultModelPresent) {
+ } else if (!component.model && allSelectedModels.indexOf(DEFAULT_MODEL_NAME) > -1) {
filteredModels.push(component);
}
});