From ab7dbbb7edc711a6d26179ed9b6cf245a857912e Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Mon, 1 Aug 2022 19:10:32 +0100 Subject: [PATCH] bootstrap: fallback on date query param --- bootstrap/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bootstrap/index.js b/bootstrap/index.js index bb23e952..83a5672e 100644 --- a/bootstrap/index.js +++ b/bootstrap/index.js @@ -22,7 +22,11 @@ const init = async () => { console.log('[GooseMod Bootstrap]', 'Found locale', locale); // eval(await (await fetch(`http://localhost:1234/goosemod.${locale}.js`)).text()); - eval(await (await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-dev/goosemod.${locale}.js?_`)).text()); + try { + eval(await (await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-dev/goosemod.${locale}.js?_`)).text()); + } catch { + eval(await (await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-dev/goosemod.${locale}.js?_${Date.now()}`)).text()); + } }; init();