Fix null check in deep equal algorithm (#4392)

This commit is contained in:
Alexander Zinchuk 2024-03-22 13:06:04 +01:00
parent b8b8c15919
commit c6c91cd21d

View File

@ -5,7 +5,8 @@ export function areDeepEqual<T extends any>(value1: T, value2: T): boolean {
return false;
}
if (type1 !== 'object') {
// eslint-disable-next-line no-null/no-null
if (type1 !== 'object' || value1 === null || value2 === null) {
return value1 === value2;
}