mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-08-28 11:46:02 +08:00
Fixes rendering issue if no opt out message is set (#235)
This commit is contained in:
parent
aec10ec9fe
commit
8635b0293e
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ const EmailForm = ({ form }: { form: UseFormReturn<TemplateUpdateParams, any> })
|
|||
const TextTable = ({ data: { text } }: { data: TextTemplateData }) => {
|
||||
const [project] = useContext(ProjectContext)
|
||||
const segmentLength = 160
|
||||
const optOutLength = project.text_opt_out_message.length
|
||||
const optOutLength = project.text_opt_out_message?.length ?? 0
|
||||
const length = (text?.length ?? 0) + optOutLength
|
||||
const segments = Math.ceil(length / segmentLength)
|
||||
return <InfoTable rows={{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue