Update tag filter

This commit is contained in:
brantje 2016-09-26 21:46:41 +02:00
parent 106cf3bf5b
commit 156f935498

View file

@ -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){