diff --git a/src/text-area-word-count/wordcount-hint-message.jsx b/src/text-area-word-count/wordcount-hint-message.jsx index 2eda5bf..7b96266 100644 --- a/src/text-area-word-count/wordcount-hint-message.jsx +++ b/src/text-area-word-count/wordcount-hint-message.jsx @@ -2,16 +2,11 @@ import React from 'react'; const WordCountHintMessage = ({ content, id, maxWordCount = 0 }) => { - const wordCount = content?.split(/\s+/).filter(Boolean).length; - + const wordCount = content?.split(/\s+/).filter(Boolean).length ?? 0; const hintId = `${id}-wordcount-hint`; let hintText = ''; - if (!wordCount && maxWordCount) { - hintText = `You have ${maxWordCount} words remaining`; - } - const wordCountText = count => count === 1 ? 'word' : 'words'; if (wordCount > maxWordCount) {