diff --git a/src/xmlbuilder/json2xml.js b/src/xmlbuilder/json2xml.js index 6c3a95dd..5707ee0f 100644 --- a/src/xmlbuilder/json2xml.js +++ b/src/xmlbuilder/json2xml.js @@ -79,7 +79,7 @@ Builder.prototype.j2x = function(jObj, level) { let attrStr = ''; let val = ''; for (let key in jObj) { - if(!jObj.hasOwnProperty(key)) continue; + if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue; if (typeof jObj[key] === 'undefined') { // supress undefined node only if it is not an attribute if (this.isAttribute(key)) {