From 2b2ac615b79fb4a0b1bba55a95a86329705c1599 Mon Sep 17 00:00:00 2001
From: Johannes Hoermann <j.hoermann@adito.de>
Date: Tue, 16 Jul 2019 11:54:45 +0200
Subject: [PATCH] address fix

---
 process/WsValidation_lib/process.js | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/process/WsValidation_lib/process.js b/process/WsValidation_lib/process.js
index 45e8e5570e..dfeb7e0835 100644
--- a/process/WsValidation_lib/process.js
+++ b/process/WsValidation_lib/process.js
@@ -271,7 +271,6 @@ WsValidationUtils.validate = function(pValue, pType, pCountry, pCity)
  */
 WsValidationUtils.setAddressFields = function(pFieldToSetToValue)
 {
-    logging.log(JSON.stringify(vars.getString("$this.value"), null, "\t"))
     try
     {
         var data = JSON.parse(vars.getString("$this.value"));
@@ -280,11 +279,10 @@ WsValidationUtils.setAddressFields = function(pFieldToSetToValue)
         // ignore error
         return
     }
-    logging.log(JSON.stringify(typeof data, null, "\t"))
     var type = typeof data;
     
-    // Only an array can be returned by the ws.   V-- this check is slow -> check number and string before
-    if (type == "number" || type == "string" || Object.prototype.toString.call(data) !== '[object Array]')
+    // Only an array can be returned by the ws.   V-- this check is slow -> check if not object before as its faster
+    if (type != "object" || Object.prototype.toString.call(data) !== '[object Array]')
         return
          
     _setField("$field.ZIP", data[1]);
-- 
GitLab