Quellcode durchsuchen

Fix incorrect checking of contact name

Alasdair Smith vor 9 Jahren
Ursprung
Commit
ca8ba6dabe

+ 1 - 1
services/web/public/coffee/ide/share/controllers/ShareProjectModalController.coffee

@@ -39,7 +39,7 @@ define [
 					$scope.autocompleteContacts = data.contacts or []
 					$scope.autocompleteContacts = data.contacts or []
 					for contact in $scope.autocompleteContacts
 					for contact in $scope.autocompleteContacts
 						if contact.type == "user"
 						if contact.type == "user"
-							if contact.last_name == "" and contact.first_name = contact.email.split("@")[0]
+							if contact.last_name and contact.first_name == contact.email.split("@")[0]
 								# User has not set their proper name so use email as canonical display property
 								# User has not set their proper name so use email as canonical display property
 								contact.display = contact.email
 								contact.display = contact.email
 							else
 							else