mirror of
https://github.com/revanced/revanced-website.git
synced 2025-04-29 22:24:31 +02:00
fix: fix TS error by using generics on shuffle
This commit is contained in:
parent
c90201f5f0
commit
740056b212
@ -38,7 +38,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const shuffle = (array: unknown[]) =>
|
const shuffle = <T,>(array: T[]) =>
|
||||||
array
|
array
|
||||||
.map((value) => ({ value, sort: Math.random() }))
|
.map((value) => ({ value, sort: Math.random() }))
|
||||||
.sort((a, b) => a.sort - b.sort)
|
.sort((a, b) => a.sort - b.sort)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user