fix: occasional error on start
Massimo Melina committed
Apr 9, 2023 at 20:32 UTC
017729a041b23a49a503e3e137197eae09c0c9fd
1 file changed
+1
-1
src/listen.ts
+1
-1
@@ -21,7 +21,7 @@ let httpsSrv: http.Server & ServerExtra
21
const openBrowserAtStart = defineConfig('open_browser_at_start', !DEV)
22
23
export function getHttpsWorkingPort() {
24
- return httpsSrv.listening && (httpsSrv.address() as any)?.port
24
+ return httpsSrv?.listening && (httpsSrv.address() as any)?.port
25
}
26
27
export const portCfg = defineConfig<number>('port', 80)