Revert "closes #992"

This reverts commit ed4b0461b9.
This commit is contained in:
psychobunny
2014-02-19 02:07:48 -05:00
parent bbe1a00d34
commit 6496ad95e8
3 changed files with 11 additions and 16 deletions

View File

@@ -13,16 +13,14 @@
expand: options.expand
}, next);
}, function (err, groups) {
groups.forEach(function(group, g, arr) {
if (parseInt(group.deleted, 10) === 1) {
delete arr[g];
// Remove deleted and hidden groups from this list
callback(err, groups.filter(function (group) {
if (parseInt(group.deleted, 10) === 1 || parseInt(group.hidden, 10) === 1) {
return false;
} else {
return true;
}
if (parseInt(group.hidden, 10) === 1) {
group.deletable = 0;
}
});
callback(err, groups);
}));
});
} else {
callback(null, []);