fix: basePath check
This commit is contained in:
parent
651471a961
commit
25fad77f25
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user