From 82dd8d6bf9e00ce3d7ea39d2880defd5c0d55bb5 Mon Sep 17 00:00:00 2001 From: BluDood Date: Fri, 25 Oct 2024 16:32:59 +0200 Subject: [PATCH] fix: check if local client build exists before using it --- src/main/lib/webapp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/lib/webapp.ts b/src/main/lib/webapp.ts index b94f00e..1fe056e 100644 --- a/src/main/lib/webapp.ts +++ b/src/main/lib/webapp.ts @@ -6,7 +6,7 @@ import fs from 'fs' import { execAsync, isDev, log } from './utils.js' export async function getWebAppDir() { - if (isDev) { + if (isDev && fs.existsSync(path.join(process.cwd(), 'client/dist'))) { log('Using local client webapp', 'Client Webapp') return path.join(process.cwd(), 'client/dist') }