Ensured title is not sent when its value is empty during short URL creation/edition

This commit is contained in:
Alejandro Celaya 2021-03-27 10:19:35 +01:00
parent eea76d88c3
commit d5e20f445d

View file

@ -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(() => {