From 2ce4edbc6d44aba79b35b64447fc557e79221031 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 13 Jan 2023 22:48:59 +0100 Subject: [PATCH] fix: rollup treeshake is dump --- src/dev/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dev/server.ts b/src/dev/server.ts index 3c8be76b7d..64dffe5dd8 100644 --- a/src/dev/server.ts +++ b/src/dev/server.ts @@ -172,7 +172,7 @@ export function createDevServer(nitro: Nitro): NitroDevServer { app.use( eventHandler(async (event) => { await reloadPromise; - const address = currentWorker?.address; + const address = currentWorker && currentWorker.address; if (!address || (address.socketPath && !existsSync(address.socketPath))) { return errorHandler(lastError, event); }