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)