summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/models/contact.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/models/contact.js b/src/models/contact.js
index ea128db2..f132038c 100644
--- a/src/models/contact.js
+++ b/src/models/contact.js
@@ -404,11 +404,17 @@ export default class Contact {
case 'firstName':
// Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.
// -> John Stevenson
+ if (isEmpty(n[0])) {
+ return n[1]
+ }
return n.slice(0, 2).reverse().join(' ')
case 'lastName':
// Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.
// -> Stevenson, John
+ if (isEmpty(n[0])) {
+ return n[1]
+ }
return n.slice(0, 2).join(', ')
}
}
@@ -420,6 +426,9 @@ export default class Contact {
if (n && !isEmpty(n)) {
// Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.
// -> John Stevenson
+ if (isEmpty(n[0])) {
+ return n[1]
+ }
return n.slice(0, 2).reverse().join(' ')
}
// LAST chance, use the org ir that's the only thing we have