From b9da44447324fe3d9d68137114035c1a9c97ceee Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Tue, 2 May 2023 13:46:55 +0200 Subject: [PATCH] do not check for updates --- theatre/studio/src/checkForUpdates.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/theatre/studio/src/checkForUpdates.ts b/theatre/studio/src/checkForUpdates.ts index 15794ad..5784f48 100644 --- a/theatre/studio/src/checkForUpdates.ts +++ b/theatre/studio/src/checkForUpdates.ts @@ -28,6 +28,7 @@ async function waitTilUIIsVisible(): Promise { } export default async function checkForUpdates() { + return // Do not check for updates, please if (process.env.BUILT_FOR_PLAYGROUND === 'true') { // Build for playground. Skipping update check return @@ -44,8 +45,8 @@ export default async function checkForUpdates() { while (true) { const state = val(getStudio().atomP.ahistoric.updateChecker) if (state) { - if (state.result !== 'error') { - const lastChecked = state.lastChecked + if (state && state?.result !== 'error') { + const lastChecked = state?.lastChecked ?? 0 const now = Date.now() const timeElapsedSinceLastCheckedForUpdate = Math.abs(now - lastChecked)