Skip to content

Commit

Permalink
fix toHTML length check
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat authored Jun 10, 2024
1 parent 202a522 commit 17fe55e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ function loader (registryOrVersion) {
}
str += '</span>'
// It's not safe to truncate HTML so just return unformatted text
return str > MAX_CHAT_LENGTH
return str.length > MAX_CHAT_LENGTH
? escapeHtml(this.toString())
: str
}
Expand Down

0 comments on commit 17fe55e

Please sign in to comment.