diff --git a/guacamole/src/main/webapp/app/manage/controllers/manageSharingProfileController.js b/guacamole/src/main/webapp/app/manage/controllers/manageSharingProfileController.js index 5f2d6bd67..7414e653a 100644 --- a/guacamole/src/main/webapp/app/manage/controllers/manageSharingProfileController.js +++ b/guacamole/src/main/webapp/app/manage/controllers/manageSharingProfileController.js @@ -261,11 +261,12 @@ angular.module('manage').controller('manageSharingProfileController', ['$scope', $scope.$watch('sharingProfile.primaryConnectionIdentifier', function retrievePrimaryConnection(identifier) { - // Pull data from existing sharing profile - connectionService.getConnection($scope.selectedDataSource, identifier) - .then(function connectionRetrieved(connection) { - $scope.primaryConnection = connection; - }, requestService.WARN); + if (identifier) { + connectionService.getConnection($scope.selectedDataSource, identifier) + .then(function connectionRetrieved(connection) { + $scope.primaryConnection = connection; + }, requestService.WARN); + } });