diff --git a/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee b/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee index 409608825e..48c6440718 100644 --- a/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee +++ b/services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee @@ -19,7 +19,7 @@ define [ , 200 INFINITE_COLLABORATORS = -1 - $scope.$watch "project.members.length", (noOfMembers) -> + $scope.$watch "(project.members.length + project.invites.length)", (noOfMembers) -> allowedNoOfMembers = $scope.project.features.collaborators $scope.canAddCollaborators = noOfMembers < allowedNoOfMembers or allowedNoOfMembers == INFINITE_COLLABORATORS