diff --git a/src/web/utils.ts b/src/web/utils.ts index 2dcd71e..65aa456 100644 --- a/src/web/utils.ts +++ b/src/web/utils.ts @@ -2,6 +2,7 @@ import { IncomingMessage } from "http"; export const reqToBasePath = (req: IncomingMessage) => { if (process.env.NEXT_PUBLIC_VERCEL_URL) { + console.log(process.env.NEXT_PUBLIC_VERCEL_URL); return process.env.NEXT_PUBLIC_VERCEL_URL; } diff --git a/src/web/worker/getDashboardForecasts.ts b/src/web/worker/getDashboardForecasts.ts index 66e1b77..ef729c1 100644 --- a/src/web/worker/getDashboardForecasts.ts +++ b/src/web/worker/getDashboardForecasts.ts @@ -14,7 +14,7 @@ export async function getDashboardForecastsByDashboardId({ dashboardItem: DashboardItem; }> { console.log("getDashboardForecastsByDashboardId: "); - if (window === undefined && !basePath) { + if (typeof window === undefined && !basePath) { throw new Error("`basePath` option is required on server side"); }