Skip to content

Commit ee08815

Browse files
committed
chore: skip deep comparison for functions in isEqual function
1 parent b220c84 commit ee08815

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,14 @@ export const useForceReRender = () => {
252252
/**
253253
* Fast deep equality comparison function
254254
* Based on fast-deep-equal library
255+
* Note: Functions are treated as equal without deep comparison
255256
*/
256257
export function isEqual(a: any, b: any): boolean {
257258
if (a === b) return true;
258259

260+
// Ignore function checks - return them as equal
261+
if (typeof a === 'function' && typeof b === 'function') return true;
262+
259263
if (a && b && typeof a === 'object' && typeof b === 'object') {
260264
if (a.constructor !== b.constructor) return false;
261265

0 commit comments

Comments
 (0)