Kaynağa Gözat

don't do a project rename if the name is the same

this prevents double renaming which happens when you press
enter as well as no name change
Henry Oswald 10 yıl önce
ebeveyn
işleme
f108c01ea5

+ 2 - 0
services/web/public/coffee/ide/settings/controllers/ProjectNameController.coffee

@@ -17,6 +17,8 @@ define [
 			newName = $scope.inputs.name
 			newName = $scope.inputs.name
 			if !newName? or newName.length == 0 or newName.length > MAX_PROJECT_NAME_LENGTH
 			if !newName? or newName.length == 0 or newName.length > MAX_PROJECT_NAME_LENGTH
 				return
 				return
+			if $scope.project.name == newName
+				return
 			$scope.project.name = newName
 			$scope.project.name = newName
 			settings.saveProjectSettings({name: $scope.project.name})
 			settings.saveProjectSettings({name: $scope.project.name})