Skip to content

Open-source document signature platform. Not affiliated with DocuSign.

TypeScript

Setup: tidy the subdomain in the preview the way the saved address is

Claudef360ba6314ea
diff --git a/src/components/setup/setup-shell.tsx b/src/components/setup/setup-shell.tsx
index 076b181..2ddc58b 100644
--- a/src/components/setup/setup-shell.tsx
+++ b/src/components/setup/setup-shell.tsx
@@ -19,6 +19,7 @@ import {
DEFAULT_SENDER_LOCAL_PART,
DEFAULT_SENDING_SUBDOMAIN,
joinSendingDomain,
+ normalizeSubdomain,
readResendEmailDomain,
suggestSendingRootDomain,
type SenderAddressParts,
@@ -586,7 +587,8 @@ function SenderFields({
}) {
const built = buildSenderAddress(parts);
const rootDomain = parts.rootDomain.trim().toLowerCase();
- const subdomain = parts.subdomain.trim().toLowerCase().replace(/\.+$/, "");
+ // The same tidying the saved address gets, so the preview matches it.
+ const subdomain = normalizeSubdomain(parts.subdomain) ?? "";
const sendingDomain = rootDomain
? joinSendingDomain(rootDomain, subdomain)
: null;