Skip to content

Commit

Permalink
nit #209
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Feb 24, 2025
1 parent 140e3d5 commit 99bd9a3
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions arches_lingo/src/arches_lingo/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,6 @@ export function checkDeepEquality(value1: unknown, value2: unknown): boolean {
return false;
}

if (
typeof value1 !== "object" ||
value1 === null ||
typeof value2 !== "object" ||
value2 === null
) {
return value1 === value2;
}

if (Array.isArray(value1) && Array.isArray(value2)) {
return (
value1.length === value2.length &&
Expand All @@ -124,6 +115,15 @@ export function checkDeepEquality(value1: unknown, value2: unknown): boolean {
);
}

if (
typeof value1 !== "object" ||
value1 === null ||
typeof value2 !== "object" ||
value2 === null
) {
return value1 === value2;
}

const object1 = value1 as Record<string, unknown>;
const object2 = value2 as Record<string, unknown>;

Expand Down

0 comments on commit 99bd9a3

Please sign in to comment.