AddressBook: fix crash when fullname is undefined.

master
Tom Hacohen 5 years ago
parent 9ec759bd44
commit 28b11e59ff

@ -67,8 +67,8 @@ const sortSelector = createSelector(
(entries: ContactType[]) => entries, (entries: ContactType[]) => entries,
(entries) => { (entries) => {
return entries.sort((_a, _b) => { return entries.sort((_a, _b) => {
const a = _a.fn; const a = _a.fn ?? '';
const b = _b.fn; const b = _b.fn ?? '';
return a.localeCompare(b, undefined, { sensitivity: 'base' }); return a.localeCompare(b, undefined, { sensitivity: 'base' });
}); });

Loading…
Cancel
Save