From d5e20f445de6f3c962745e18e48b0ea631ea046f Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 27 Mar 2021 10:19:35 +0100 Subject: [PATCH] Ensured title is not sent when its value is empty during short URL creation/edition --- src/short-urls/ShortUrlForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/short-urls/ShortUrlForm.tsx b/src/short-urls/ShortUrlForm.tsx index 81da5175..914f6d7b 100644 --- a/src/short-urls/ShortUrlForm.tsx +++ b/src/short-urls/ShortUrlForm.tsx @@ -49,6 +49,7 @@ export const ShortUrlForm = ( validSince: formatIsoDate(shortUrlData.validSince) ?? null, validUntil: formatIsoDate(shortUrlData.validUntil) ?? null, maxVisits: !hasValue(shortUrlData.maxVisits) ? null : Number(shortUrlData.maxVisits), + title: !hasValue(shortUrlData.title) ? undefined : shortUrlData.title, }).then(() => !isEdit && reset()).catch(() => {})); useEffect(() => {