do not check for updates

This commit is contained in:
jrkb 2023-05-02 13:46:55 +02:00
parent 7d235386e7
commit b9da444473

View file

@ -28,6 +28,7 @@ async function waitTilUIIsVisible(): Promise<undefined> {
}
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)