diff --git a/src/js/index.js b/src/js/index.js index 9f5a6c6c0..288d63b83 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -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; }); }); }; }); diff --git a/src/views/apps.html b/src/views/apps.html index 8c0cd353a..03de4307e 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -487,14 +487,14 @@ Your Apps
- +
-