From 7530fd299d53a930c3c3f9199025af5fe6ed1d6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de>
Date: Wed, 16 Mar 2022 13:44:48 +0100
Subject: [PATCH] refactor: UserData set contact mail / person even if empty in
 source data

---
 bin/backend/controls/userData/UserData.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/backend/controls/userData/UserData.js b/bin/backend/controls/userData/UserData.js
index 06d011d..00f1013 100644
--- a/bin/backend/controls/userData/UserData.js
+++ b/bin/backend/controls/userData/UserData.js
@@ -300,9 +300,9 @@ define('package/quiqqer/erp/bin/backend/controls/userData/UserData', [
             this.$AddressDisplay.value = this.$getAddressLabel();
 
             if (this.getAttribute('isCommercial')) {
-                if (checkVal(this.getAttribute('contactPerson'))) {
+                if (this.getAttribute('contactPerson') !== false) {
                     this.$ContactPerson.value = this.getAttribute('contactPerson');
-                } else if (checkVal(this.getAttribute('contact_person'))) {
+                } else if (this.getAttribute('contact_person') !== false) {
                     this.$ContactPerson.value = this.getAttribute('contact_person');
                 }
 
@@ -311,9 +311,9 @@ define('package/quiqqer/erp/bin/backend/controls/userData/UserData', [
                 this.$RowContactPerson.setStyle('display', 'none');
             }
 
-            if (checkVal(this.getAttribute('contactEmail'))) {
+            if (this.getAttribute('contactEmail') !== false) {
                 this.$ContactEmail.value = this.getAttribute('contactEmail');
-            } else if (checkVal(this.getAttribute('contact_email'))) {
+            } else if (this.getAttribute('contact_email') !== false) {
                 this.$ContactEmail.value = this.getAttribute('contact_email');
             }
         },
-- 
GitLab