Skip to content

Commit

Permalink
fix(loading): disable checkForUpdates when offline
Browse files Browse the repository at this point in the history
  • Loading branch information
tomorrowevening authored and AriaMinaei committed Jan 4, 2024
1 parent 38071f8 commit 117f098
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/studio/src/Studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,11 @@ export class Studio {

if (process.env.NODE_ENV !== 'test') {
this.ui.render()
checkForUpdates().catch((err) => {
console.error(err)
})
if (navigator.onLine) {
checkForUpdates().catch((err) => {
console.error(err)
})
}
}
}

Expand Down

1 comment on commit 117f098

@vercel
Copy link

@vercel vercel bot commented on 117f098 Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.