Fix domain filter select
This commit is contained in:
+5
-7
@@ -225,15 +225,13 @@ app.filter('selectedTagFilter', function () {
|
||||
});
|
||||
|
||||
app.filter('selectedDomainFilter', function () {
|
||||
return function selectedDomainFilter(apps, selectedDomains) {
|
||||
return function selectedDomainFilter(apps, selectedDomain) {
|
||||
return apps.filter(function (app) {
|
||||
if (selectedDomains.length === 0) return true;
|
||||
if (!selectedDomain) return true;
|
||||
if (selectedDomain._alldomains) return true; // magic domain for single select, see apps.js ALL_DOMAINS_DOMAIN
|
||||
|
||||
return !!selectedDomains.find(function (domain) {
|
||||
if (app.domain === domain.domain) return true;
|
||||
|
||||
return !!app.alternateDomains.find(function (ad) { return ad.domain === domain.domain; });
|
||||
});
|
||||
if (selectedDomain.domain === app.domain) return true;
|
||||
return !!app.alternateDomains.find(function (ad) { return ad.domain === selectedDomain.domain; });
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user