Skip to content

Commit

Permalink
fix(countTextInBlocks): Don't count text if maxChars is not set - ref…
Browse files Browse the repository at this point in the history
…s #153110
  • Loading branch information
avoinea committed Aug 22, 2022
1 parent e8fb798 commit 230298a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/manage/Blocks/Group/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 230298a

Please sign in to comment.