diff --git a/apps/roboshield/src/payload/utils/formatDraftUrl.ts b/apps/roboshield/src/payload/utils/formatDraftUrl.ts index 95bdac0bb..dbfe69ecf 100644 --- a/apps/roboshield/src/payload/utils/formatDraftUrl.ts +++ b/apps/roboshield/src/payload/utils/formatDraftUrl.ts @@ -1,15 +1,13 @@ import formatPagePath from "./formatPagePath"; import { Document } from "payload/types"; -const payloadUrl = process.env.PAYLOAD_PUBLIC_APP_URL || process.env.NEXT_PUBLIC_APP_URL; +const payloadUrl = + process.env.PAYLOAD_PUBLIC_APP_URL || process.env.NEXT_PUBLIC_APP_URL; function formatDraftUrl(collection: string, doc: Document) { const pagePath = formatPagePath(collection, doc); if (pagePath) { const slug = pagePath; - const url = new URL( - `/api/draft?slug=${slug}`, - payloadUrl, - ); + const url = new URL(`/api/draft?slug=${slug}`, payloadUrl); return url.href; } return null;