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
[x]Bug Fix
[ ]Refactoring / Technology upgrade
[ ]New Feature
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.
coverage: 98.248%. remained the same when pulling 085defae78faaa016e0a2fa37024646946f72563 on ardatan:patch-1 into 9504facf504216a83472cce10c8f65a9d37dbb72 on NaturalIntelligence:master.
Purpose / Goal
If the given object has
null
prototype instead ofObject
, it throwsjObj.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.