Frontend: fix warnings in withoutAssignedUsers filter

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-10-11 13:17:50 +02:00
committed by Julius Härtl
parent a322c7a3b5
commit 090d99a360
3 changed files with 81 additions and 3 deletions

View File

@@ -20,10 +20,13 @@
*
*/
/**
/* global app */
/* global angular */
/*
* Remove all assignedUsers from users list
*/
app.filter('withoutAssignedUsers', function ($filter) {
app.filter('withoutAssignedUsers', function () {
return function (users, assignedUsers) {
var _result = [];
angular.forEach(users, function (user) {
@@ -33,8 +36,9 @@ app.filter('withoutAssignedUsers', function ($filter) {
_found = true;
}
});
if (_found === false)
if (_found === false) {
_result.push(user);
}
});
return _result;
};