Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandreannic committed Mar 6, 2023
1 parent 07dbc8a commit 4f54333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useSetState/UseSetState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useSetState = <T>(initialValue: T[] = []): UseSetState<T> => {

const add = (t: T | T[]): void => {
if (Array.isArray(t)) {
const newSet = new Set(t)
const newSet = new Set([...set.values(), ...t])
setSet(newSet)
} else {
set.add(t)
Expand Down

0 comments on commit 4f54333

Please sign in to comment.