From 2145b93704a0677258eb5331a1e7a49736ec72a1 Mon Sep 17 00:00:00 2001 From: Florian Schmid Date: Wed, 12 Apr 2023 14:26:35 +0200 Subject: [PATCH] fix await fetch --- game.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game.js b/game.js index 5a62ad0..491c141 100644 --- a/game.js +++ b/game.js @@ -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();