diff --git a/js/app/filters/tagfilter.js b/js/app/filters/tagfilter.js index 1ee00496..1ba9b589 100644 --- a/js/app/filters/tagfilter.js +++ b/js/app/filters/tagfilter.js @@ -15,14 +15,16 @@ angular.module('passmanApp') if(tags.length > 0) { for (var ci = 0; ci < credentials.length; ci++) { var c = credentials[ci]; + var matches = 0; for (var ct = 0; ct < c.tags_raw.length; ct++) { var t = c.tags_raw[ct]; if(tags.indexOf(t.text) != -1){ - if(_credentials.indexOf(c) === -1){ - _credentials.push(c); - } + matches++; } } + if(matches === tags.length){ + _credentials.push(c); + } } } if(tags.length == 0){