diff --git a/.gitignore b/.gitignore index fc79881..a2b79c5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ tests/e2e/screenshots selenium-debug.log !.gitkeep +/build/config/*-custom.json5 diff --git a/src/lib/index.js b/src/lib/index.js index d130596..3c58eb9 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -294,10 +294,11 @@ export function getPatientEmail(patient = {}) { export function getPatientHomeAddress(patient = {}) { let a = (patient.address || []); a = a.find(c => c.use == "home") || a[0] || {}; - return [a.line, a.postalCode, a.city, a.country] + var l = [a.line, a.postalCode, a.city, a.country] .map(x => String(x || "").trim()) .filter(Boolean) .join(" "); + return l ? l : a.text || ""; } /**