Add delay to version alerter errors

This commit is contained in:
Konstantin Wohlwend 2024-11-08 16:17:44 +01:00
parent eabde95a32
commit 85cc1edd7f

View File

@ -45,6 +45,8 @@ export function VersionAlerter({ severeOnly }: { severeOnly: boolean }) {
if (cancelled) return;
setVersionCheckResult(data.upToDate ? null : data);
} catch (e) {
// wait a little bit because the error may have been caused by a page reload
await wait(2000);
if (cancelled) return;
console.error("Error checking version", e);
setVersionCheckResult({ severe: true, error: `Error checking version, please make sure you're connected to the internet. See the console for more details. \n${e}` });