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 255a511 commit 2cef057
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 @@ -29,7 +29,7 @@ export const useSetState = <T>(initialValue: T[] = []): UseSetState<T> => {
}

const remove = (t: T | T[]): boolean => {
const returnValue = [t].flatMap(_ => _).map(set.delete)
const returnValue = [t].flatMap(_ => _).map(_ => set.delete(_))
setSet(new Set(set))
return returnValue[returnValue.length - 1]
}
Expand Down

0 comments on commit 2cef057

Please sign in to comment.