Skip to content

Commit

Permalink
fix: fix TS error by using generics on shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
KTibow committed Jan 11, 2024
1 parent c90201f commit 740056b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/donate/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
}
}
const shuffle = (array: unknown[]) =>
const shuffle = <T,>(array: T[]) =>
array
.map((value) => ({ value, sort: Math.random() }))
.sort((a, b) => a.sort - b.sort)
Expand Down

0 comments on commit 740056b

Please sign in to comment.