Minor bug fix

This commit is contained in:
Scott Idem
2025-02-26 11:11:56 -05:00
parent 89b14c877e
commit 6e330a639e

View File

@@ -127,9 +127,9 @@ function create_video_element({account_id, base_url, hosted_file_id, filename=nu
// }
// This function will take a long string (sentences or paraghraphs) of text and return an estimated number of words.
// This function will take a long string (sentences or paragraphs) of text and return an estimated number of words.
function count_words(text: string) {
if (!text && text.length < 1) {
if (!text || text.length < 1) {
return false;
}
let count = text.trim().split(/\s+/).length;