Skip to content

Commit

Permalink
馃弮 avoid runtime error with compact (#8094)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Mar 25, 2022
1 parent 8c3949a commit fe511bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/compact.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export default <TValue>(value: TValue[]) => value.filter(Boolean);
export default <TValue>(value: TValue[]) =>
Array.isArray(value) ? value.filter(Boolean) : [];

0 comments on commit fe511bb

Please sign in to comment.