From 32d30be94312b6e2dd2fd283988a794667ae2691 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Thu, 3 Sep 2020 18:58:20 +0200 Subject: [PATCH] fix(Contact): fix issue with address parsing sentry #1866716154 --- src/views/Delegate/Contact.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/Delegate/Contact.vue b/src/views/Delegate/Contact.vue index 0f599d7..1ef9ce2 100644 --- a/src/views/Delegate/Contact.vue +++ b/src/views/Delegate/Contact.vue @@ -203,11 +203,15 @@ export default { if (raw.length === 3) { this.secondLine = raw[1] raw = raw[2].split('%postalsep%') + this.postalCode = raw[0] + this.city = raw[1] } else { - raw = raw[1].split('%postalsep%') + if (raw.length > 0) { + raw = raw[1].split('%postalsep%') + this.postalCode = raw[0] + this.city = raw[1] + } } - this.postalCode = raw[0] - this.city = raw[1] } else { // encode address let encoded = ''