diff --git a/packages/dito/app/routes/vorpruefung.ergebnis/route.tsx b/packages/dito/app/routes/vorpruefung.ergebnis/route.tsx index 8f6b16c9..81edf9fa 100644 --- a/packages/dito/app/routes/vorpruefung.ergebnis/route.tsx +++ b/packages/dito/app/routes/vorpruefung.ergebnis/route.tsx @@ -71,7 +71,7 @@ export async function action({ request }: ActionFunctionArgs) { method: "POST", body: formData, }); - const uniqueUrl = (await uniqueResponse.json()).url; + const uniqueUrl = (await uniqueResponse.json()).url as string; if (action === "email") { const emailTemplate = preCheck.result.form.emailTemplate; const subject = `${emailTemplate.subject}: „${formData.get("title")}“`; diff --git a/packages/dito/tests/playwright/e2e/assessment.spec.ts b/packages/dito/tests/playwright/e2e/assessment.spec.ts index c376d1dc..251692da 100644 --- a/packages/dito/tests/playwright/e2e/assessment.spec.ts +++ b/packages/dito/tests/playwright/e2e/assessment.spec.ts @@ -239,7 +239,7 @@ test.describe("test quicksend email", () => { .getByRole("link", { name: "E-Mail erstellen" }) .getAttribute("href"); - const mailTo = new URL(emailHref || ""); + const mailTo = new URL(emailHref ?? ""); expect(mailTo.searchParams.get("subject")).toBe( "Digitalcheck Vorprüfung: „Policy ABCDEFG“", @@ -255,9 +255,9 @@ test.describe("test quicksend email", () => { .getByRole("link", { name: "E-Mail erstellen" }) .getAttribute("href"); - const mailTo = new URL(emailHref || ""); + const mailTo = new URL(emailHref ?? ""); const bodyUrl = - mailTo.searchParams.get("body")?.match(/(https?:\/\/[^\s]+)/g)?.[0] || ""; + mailTo.searchParams.get("body")?.match(/(https?:\/\/[^\s]+)/g)?.[0] ?? ""; expect(mailTo.searchParams.get("subject")).toBe( "Digitalcheck Vorprüfung: „Policy XYZ“",