diff --git a/process/WsValidation_lib/process.js b/process/WsValidation_lib/process.js index 45e8e5570ec282ef34ab6639943b29a26b9feb80..dfeb7e0835ca991790f377433728af7be78b6f2f 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]);