fix issue #373 suppresses comma when last name sorting is selected

This commit is contained in:
suntala 2018-03-21 21:56:26 +01:00
parent 573a7c8164
commit dbd8243532
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,8 @@ angular.module('contactsApp')
if (SortByService.getSortByKey() === 'sortLastName') {
return (
ctrl.contact.lastName() + ', '
ctrl.contact.lastName()
+ (ctrl.contact.firstName() ? ', ' : '')
+ ctrl.contact.firstName() + ' '
+ ctrl.contact.additionalNames()
).trim();
@ -31,3 +32,4 @@ angular.module('contactsApp')
return ctrl.contact.displayName();
};
});