Skip to content

Commit

Permalink
refactor: Switch to Object.hasOwn
Browse files Browse the repository at this point in the history
  • Loading branch information
onlined committed Feb 28, 2024
1 parent 3c6dc2d commit d6b9b6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vanilla/shallow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function shallow<T>(objA: T, objB: T) {
}
for (let i = 0; i < keysA.length; i++) {
if (
!Object.prototype.hasOwnProperty.call(objB, keysA[i] as string) ||
!Object.hasOwn(objB, keysA[i] as string) ||
!Object.is(objA[keysA[i] as keyof T], objB[keysA[i] as keyof T])
) {
return false
Expand Down

0 comments on commit d6b9b6d

Please sign in to comment.