[Init] Assign window object before everything else

This commit is contained in:
Beef 2023-01-01 21:10:09 +00:00
parent 276cd18a5b
commit 48138c5b7c
3 changed files with 12 additions and 6 deletions

View file

@ -19,10 +19,6 @@ async function init() {
let erroredOnLoad = false;
try {
initSettings();
patchAssets();
patchLogHook();
window.vendetta = {
patcher: patcher,
metro: { ...metro, common: { ...common } },
@ -48,6 +44,10 @@ async function init() {
},
logger: logger,
};
initSettings();
patchAssets();
patchLogHook();
} catch (e: Error | any) {
erroredOnLoad = true;
alert(`Vendetta failed to initialize...\n${e.stack || e.toString()}`);