From 0b7fbafaa6e9eec95b356fb05acb158ef654b2f3 Mon Sep 17 00:00:00 2001 From: Artemy Date: Tue, 20 Jun 2023 18:11:50 +0300 Subject: [PATCH] fix: mojang dos --- src/renderer/src/pages/Main.jsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/pages/Main.jsx b/src/renderer/src/pages/Main.jsx index 6b3da17..a9d3260 100644 --- a/src/renderer/src/pages/Main.jsx +++ b/src/renderer/src/pages/Main.jsx @@ -24,10 +24,11 @@ function Main() { const [started, setStarted] = useState(false) const [gameStarted, setGameStarted] = useState(false) - utils.getVersions().then((data) => { - setVersions(data) - setVersion(data[0]) - }) + if (!versions) + utils.getVersions().then((data) => { + setVersions(data.filter((v) => v.type === 'release')) + setVersion(data[0]) + }) return ( versions && ( @@ -45,14 +46,11 @@ function Main() { />
-