Skip to content

Commit

Permalink
fix: only use merge enumerable properties (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Sep 16, 2021
1 parent c7e1019 commit 0967070
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
}

/**
Expand Down

0 comments on commit 0967070

Please sign in to comment.