From 655f52a876d038c10b3f738cd685cf99d8b2e267 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 17 Sep 2021 11:58:39 +0200 Subject: [PATCH] fix excess separator, if not 2nd street-line --- api/src/Contacts/JsContact.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/Contacts/JsContact.php b/api/src/Contacts/JsContact.php index f7b71d17bf..ac2be3a756 100644 --- a/api/src/Contacts/JsContact.php +++ b/api/src/Contacts/JsContact.php @@ -518,12 +518,12 @@ class JsContact $components = []; foreach(func_get_args() as $street) { - if ($components) - { - $components[] = ['type' => 'separator', 'value' => "\n"]; - } if (!empty($street)) { + if ($components) + { + $components[] = ['type' => 'separator', 'value' => "\n"]; + } $components[] = ['type' => 'name', 'value' => $street]; } }