diff --git a/services/web/frontend/js/features/word-count-modal/utils/count-words-in-file.ts b/services/web/frontend/js/features/word-count-modal/utils/count-words-in-file.ts index a917d54014..a57f7a84fb 100644 --- a/services/web/frontend/js/features/word-count-modal/utils/count-words-in-file.ts +++ b/services/web/frontend/js/features/word-count-modal/utils/count-words-in-file.ts @@ -303,7 +303,7 @@ export const countWordsInFile = ( to: preambleExtent.to, enter(nodeRef: SyntaxNodeRef) { if (state.skipping && !nodeRef.type.is('Comment')) { - return false + return } return headMatcher(nodeRef.type)?.(nodeRef) }, @@ -313,7 +313,7 @@ export const countWordsInFile = ( from: preambleExtent.to, enter(nodeRef: SyntaxNodeRef) { if (state.skipping && !nodeRef.type.is('Comment')) { - return false + return } return bodyMatcher(nodeRef.type)?.(nodeRef) },