Skip to content

Commit

Permalink
fix: split props
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Mar 28, 2024
1 parent d2fe829 commit ef27ebf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/utils/src/split-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ export const splitProps: SplitPropsFn = (props: any, keys: any[]) => {
}
return clone
}

const fn = (key: any) => split(Array.isArray(key) ? key : dKeys.filter(key))

return fn(keys).concat(split(dKeys))
return [keys].map(fn).concat(split(dKeys)) as any
}

export const createSplitProps = <T>(keys: (keyof T)[]) => {
Expand Down

0 comments on commit ef27ebf

Please sign in to comment.