Fixes undefined bug

This commit is contained in:
Marcos Zuriaga 2016-09-30 20:06:31 +02:00
parent 511d20acbe
commit 288e6f19c0

View file

@ -105,12 +105,10 @@ angular.module('passmanApp')
var list = $scope.share_settings.credentialSharedWithUserAndGroup;
console.log(list);
for (var i = 0; i < list.length; i++){
console.log(list[i]);
var iterator = i;
if (list[i].type == "user") {
ShareService.getVaultsByUser(list[i].userId).then(function (data) {
console.log(list);
console.log(i);
list[i].vaults = data;
list[iterator].vaults = data;
console.log(data);
var start = new Date().getTime() / 1000;