Skip to content

Commit

Permalink
fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea committed Nov 2, 2020
1 parent 30a72f1 commit 5287a42
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions projects/cdk/constants/matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@ export const TUI_IDENTITY_MATCHER: TuiIdentityMatcher<unknown> = (item1, item2)
item1 === item2 || bothEmpty(item1, item2);

function bothEmpty(item1: unknown, item2: unknown): boolean {
return (
item1 instanceof Array && item2 instanceof Array && !item1.length && !item2.length
);
return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;
}

0 comments on commit 5287a42

Please sign in to comment.