diff --git a/src/utils.ts b/src/utils.ts index 125a7b1f..df1fd40b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -81,7 +81,10 @@ export function objectHasProperty( object: object, property: RecordProperty ): boolean { - return typeof object === "object" && property in object; + return ( + typeof object === "object" && + Object.prototype.propertyIsEnumerable.call(object, property) + ); } /**