We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43b89fa commit b7c7c8bCopy full SHA for b7c7c8b
1 file changed
src/calculator/id/components/IdGroupHashComponent.tsx
@@ -6,13 +6,12 @@ import GroupHashComponent from "../../GroupHashComponent.tsx"
6
export default function IdGroupHashComponent({mods}: { mods: IdMod[] }) {
7
const [combinedHash, setCombinedHash] = useState<string>()
8
9
+
10
useEffect(() => {
- const input: string = mods
11
- .filter((mod) => !mod.softWhitelist)
12
- .map((mod) => mod.id)
13
- .sort()
14
- .join("|")
15
- md5(input).then((result) => setCombinedHash(result))
+ (async () => {
+ const hashes = await Promise.all(mods.filter((mod) => !mod.softWhitelist).map((mod) => mod.id))
+ setCombinedHash(await md5(hashes.sort().join("|")))
+ })()
16
}, [mods])
17
18
return (
0 commit comments