Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Glen Van Ginkel committed Jul 28, 2020
1 parent a3e173d commit 15fb9d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ export const isObject = (obj: unknown): obj is Record<string, unknown> => {
};

export const strictDeepEqual = (first: unknown, second: unknown): boolean => {
console.info('strictDeepEqual', first, second);
if (first === second) {
return true;
}
if (typeof first !== typeof second) {
console.info('[NOT HERE - 1]', typeof first, typeof second);
return false;
}
if (Array.isArray(first) && Array.isArray(second)) {
if (first.length !== second.length) {
console.info('[NOT HERE - 2]', first.length, second.length);

return false;
}
for (let i = 0; i < first.length; i += 1) {
if (!strictDeepEqual(first[i], second)[i]) {
if (!strictDeepEqual(first[i], second[i])) {
console.info('[NOT HERE - 2]', first.length, second.length);
return false;
}
}
Expand Down

0 comments on commit 15fb9d9

Please sign in to comment.