Skip to content

Commit

Permalink
[FIX] Runtime isInstalled potential crash (#4076)
Browse files Browse the repository at this point in the history
Revert "[FIX] Runtime isInstalled potential crash"

This reverts commit 9d424ef.

[FIX] Runtime isInstalled potential crash
  • Loading branch information
Etaash-mathamsetty authored Nov 8, 2024
1 parent 8bd1165 commit 34fc2b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/wine/runtimes/runtimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async function download(name: RuntimeName): Promise<boolean> {
async function isInstalled(name: RuntimeName) {
if (!existsSync(join(runtimePath, name))) return false

const runtimes = await _get()
const runtimes = await _get().catch(() => [])
const runtime = runtimes.find((inst) => inst.name === name)

// this should be impossible, so prevent redownload by faking it's installed
Expand Down

0 comments on commit 34fc2b7

Please sign in to comment.