Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.9k stars 606 forks source link

TypeError: obj.hasOwnProperty is not a function #48 #666

Closed iberdov closed 1 year ago

iberdov commented 1 year ago

The 0.5.0 version results in bug. In utils.js function convertNodeToObject results error above.

There is bug in different module, it uses xml2js.parseStringPromise Previous version is fine.

Leonidas-from-XIV commented 1 year ago

I am a bit confused what this is referring to, since node-xml2js does not have a utils.js file nor does it have a convertNodeToObject function. I am assuming the bug you see is due to the backwards-incompatible change in node-xml2js 0.5.0 and whatever code uses it needs to be updated.

iberdov commented 1 year ago

Sorry, I was too fast. Not util.js (it is different module, whic uses xml2js) The problem is that parseStringPromise now returns object without prototype and function hasOwnProperty fails, but this is already in different module. My opologizes. I will check in different place