diff --git a/src/vanilla/shallow.ts b/src/vanilla/shallow.ts index 7836a912a7..9b94504df5 100644 --- a/src/vanilla/shallow.ts +++ b/src/vanilla/shallow.ts @@ -39,7 +39,7 @@ export function shallow(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