Skip to content

Commit

Permalink
Disable offset caching temporarily
Browse files Browse the repository at this point in the history
  • Loading branch information
ottomated committed Dec 4, 2020
1 parent ef62036 commit ad23db7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ async function loadOffsets(event: Electron.IpcMainEvent): Promise<IOffsets | und

let data: string;
let offsetStore = store.get('offsets') || {};
if (version === offsetStore.version) {
// TEMPORARILY DISABLING OFFSET CACHING
if (false /*version === offsetStore.version*/ ) {
data = offsetStore.data;
} else {
try {
Expand All @@ -77,7 +78,7 @@ async function loadOffsets(event: Electron.IpcMainEvent): Promise<IOffsets | und
let e = _e as AxiosError;
console.error(e);
if (e?.response?.status === 404) {
event.reply('error', `Couldn't fetch the latest game offsets from the server: ${store.get('serverURL')}/${version}.yml.\nThis might be because you are on an unsupported version of Among Us.`);
event.reply('error', `You are on an unsupported version of Among Us: ${version}.`);
} else {
event.reply('error', `Couldn't fetch the latest game offsets from the server: ${store.get('serverURL')}/${version}.yml.\n${e}`);
}
Expand Down

0 comments on commit ad23db7

Please sign in to comment.