fix: prevent infinite re-render loop from issue retry callbacks (#2550)

This commit is contained in:
Dermot Duffy
2026-06-30 17:45:13 -07:00
committed by dermotduffy
parent c3d3dd3934
commit 3fe5e4004a
7 changed files with 137 additions and 99 deletions
+10
View File
@@ -329,6 +329,16 @@ export const generateFloatApproximatelyEqualsCustomizer = (
};
};
// For change-detection equality: a function's identity churns and is not
// observable state, so two functions compare equal; a function appearing or
// disappearing is still a real change. Only apply where a data field beside the
// callback carries the meaningful change, not where a function's identity is
// itself the state (e.g. a controller keyed by which element it wraps).
export const ignoreFunctionIdentity = (a: unknown, b: unknown): boolean | undefined =>
typeof a === 'function' || typeof b === 'function'
? typeof a === 'function' && typeof b === 'function'
: undefined;
export const convertHTTPAdressToWebsocket = (url: string): string => {
return url.replace(/^http/i, 'ws');
};