NaturalIntelligence / fast-xml-parser

Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
https://naturalintelligence.github.io/fast-xml-parser/
MIT License
2.53k stars 303 forks source link

Fix `jObj.hasOwnProperty is not a function` #613

Closed ardatan closed 1 year ago

ardatan commented 1 year ago

Purpose / Goal

If the given object has null prototype instead of Object, it throws jObj.hasOwnProperty is not function error. Object.prototype.hasOwnProperty.call( should be used instead for this kind of objects.

Type

Please mention the type of PR

Note : Please ensure that you've read contribution guidelines before raising this PR. If your PR is in progress, please prepend [WIP] in PR title. Your PR will be reviewed when [WIP] will be removed from the PR title.

Bookmark this repository for further updates.

coveralls commented 1 year ago

Coverage Status

coverage: 98.248%. remained the same when pulling 085defae78faaa016e0a2fa37024646946f72563 on ardatan:patch-1 into 9504facf504216a83472cce10c8f65a9d37dbb72 on NaturalIntelligence:master.

ardatan commented 1 year ago

Thanks for merging the PR! @amitguptagwl When do you think you can release it?

amitguptagwl commented 1 year ago

Sorry, I completely missed it. just published