Skip to content

Commit

Permalink
Fix TS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchmidt committed Sep 30, 2024
1 parent c9820f2 commit 5e638d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/dito/app/routes/vorpruefung.ergebnis/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Check warning on line 74 in packages/dito/app/routes/vorpruefung.ergebnis/route.tsx

View workflow job for this annotation

GitHub Actions / check-test-build-deploy (dito) / check-and-test-shared / check-and-test

Unsafe member access .url on an `any` value

Check warning on line 74 in packages/dito/app/routes/vorpruefung.ergebnis/route.tsx

View workflow job for this annotation

GitHub Actions / check-test-build-deploy (dito) / check-and-test-shared / check-and-test

Unsafe member access .url on an `any` value
if (action === "email") {
const emailTemplate = preCheck.result.form.emailTemplate;
const subject = `${emailTemplate.subject}: „${formData.get("title")}“`;

Check warning on line 77 in packages/dito/app/routes/vorpruefung.ergebnis/route.tsx

View workflow job for this annotation

GitHub Actions / check-test-build-deploy (dito) / check-and-test-shared / check-and-test

Invalid type "FormDataEntryValue | null" of template literal expression

Check warning on line 77 in packages/dito/app/routes/vorpruefung.ergebnis/route.tsx

View workflow job for this annotation

GitHub Actions / check-test-build-deploy (dito) / check-and-test-shared / check-and-test

Invalid type "FormDataEntryValue | null" of template literal expression
Expand Down
6 changes: 3 additions & 3 deletions packages/dito/tests/playwright/e2e/assessment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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“",
Expand All @@ -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“",
Expand Down

0 comments on commit 5e638d6

Please sign in to comment.