Skip to content

Commit

Permalink
perf: avoid unnecessary flat
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Apr 25, 2023
1 parent 4dd99a7 commit 5675b7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/solid/src/render/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export function splitProps<
T extends Record<any, any>,
K extends [readonly (keyof T)[], ...(readonly (keyof T)[])[]]
>(props: T, ...keys: K): SplitProps<T, K> {
const blocked = new Set<keyof T>(keys.flat());
const blocked = new Set<keyof T>(keys.length > 1 ? keys.flat() : [keys[0]]);
if ($PROXY in props) {
const res = keys.map(k => {
return new Proxy(
Expand Down

0 comments on commit 5675b7c

Please sign in to comment.