diff --git a/src/utils.ts b/src/utils.ts index 722c413ee..38eccc30e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -84,7 +84,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) + ); } /**