From 3badb79bc8dfc855ebc5b2bc4e00f3aa4a13ffdf Mon Sep 17 00:00:00 2001 From: Rizky Date: Tue, 11 Jun 2024 16:08:57 +0700 Subject: [PATCH] fix --- app/srv/ws/sync/code/parts/init/frontend.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/srv/ws/sync/code/parts/init/frontend.ts b/app/srv/ws/sync/code/parts/init/frontend.ts index e05aead6..40c1b714 100644 --- a/app/srv/ws/sync/code/parts/init/frontend.ts +++ b/app/srv/ws/sync/code/parts/init/frontend.ts @@ -119,13 +119,13 @@ export const initFrontEnd = async ( filename?.endsWith(".css") || filename?.endsWith(".html")) ) { - if (!fe.rebuilding) { + if (typeof fe !== 'undefined' && !fe.rebuilding) { fe.rebuilding = true; await fe.ctx.rebuild(); fe.rebuilding = false; } - if (!srv.rebuilding && srv.ctx) { + if (typeof srv !== 'undefined' && !srv.rebuilding && srv.ctx) { srv.rebuilding = true; await srv.ctx.rebuild(); await server.init(id_site);