Skip to content

Commit

Permalink
Merge pull request #34 from yamada-ui/fix/mixed-array-type
Browse files Browse the repository at this point in the history
Updated MixedArray type definition
  • Loading branch information
108yen authored Sep 3, 2024
2 parents 4192b5a + dc6897f commit df33255
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/array.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type MixedArray = string | (string | string)[]
export type MixedArray = string | string[] | undefined

export const toArray = (mixedArray: MixedArray) =>
(Array.isArray(mixedArray) ? mixedArray.flat() : [mixedArray]).filter(Boolean)
Expand Down

0 comments on commit df33255

Please sign in to comment.