mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-24 03:21:03 +00:00
fix: fix TS error by using generics on shuffle
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user