diff --git a/js/app/controllers/share.js b/js/app/controllers/share.js index 0d9e166f..861020ed 100644 --- a/js/app/controllers/share.js +++ b/js/app/controllers/share.js @@ -216,7 +216,7 @@ }; var found = false; for (var z = 0; z < $scope.share_settings.credentialSharedWithUserAndGroup.length; z++) { - if ($scope.share_settings.credentialSharedWithUserAndGroup[z].userId === shareWith[z].uid) { + if (shareWith[z] && $scope.share_settings.credentialSharedWithUserAndGroup[z].userId === shareWith[z].uid) { found = true; } } diff --git a/templates/views/partials/forms/share_credential/basics.html b/templates/views/partials/forms/share_credential/basics.html index f3142d25..8774998d 100644 --- a/templates/views/partials/forms/share_credential/basics.html +++ b/templates/views/partials/forms/share_credential/basics.html @@ -17,7 +17,7 @@