fix: Contact form breaks if name is empty (#10597)

- Handles the case where the form and contact display page breaks if
name is `null`
This commit is contained in:
Sojan Jose 2024-12-17 17:16:50 +05:30 committed by GitHub
parent b34dac7bbe
commit 1d88e0dd28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -94,7 +94,7 @@ const prepareStateBasedOnProps = () => {
phoneNumber, phoneNumber,
additionalAttributes = {}, additionalAttributes = {},
} = props.contactData || {}; } = props.contactData || {};
const { firstName, lastName } = splitName(name); const { firstName, lastName } = splitName(name || '');
const { const {
description = '', description = '',
companyName = '', companyName = '',