From 230298a23f9f67d76721b201cafdfd60c8be0f17 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Mon, 22 Aug 2022 14:30:52 +0300 Subject: [PATCH] fix(countTextInBlocks): Don't count text if maxChars is not set - refs #153110 --- src/components/manage/Blocks/Group/Edit.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/manage/Blocks/Group/Edit.jsx b/src/components/manage/Blocks/Group/Edit.jsx index 2e07a66..115c9c6 100644 --- a/src/components/manage/Blocks/Group/Edit.jsx +++ b/src/components/manage/Blocks/Group/Edit.jsx @@ -80,6 +80,9 @@ const Edit = (props) => { */ const countTextInBlocks = (blocksObject) => { let groupCharCount = 0; + if (!props.data.maxChars) { + return groupCharCount; + } Object.keys(blocksObject).forEach((blockId) => { const foundText = blocksObject[blockId]?.plaintext