fix await fetch

This commit is contained in:
Florian Schmid 2023-04-12 14:26:35 +02:00
parent 558b75b3c6
commit 2145b93704

View File

@ -8,9 +8,9 @@ var nextCpu;
var score;
export async function main() {
await fetch('./data.json')
await (fetch('./data.json')
.then((response) => response.json())
.then((json) => cpuList = json);
.then((json) => cpuList = json));
currentCpu = getRandomCpu();
nextCpu = getRandomCpu();