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);