Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Commit

Permalink
Add diagnostic message for goofy title crash (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMaas authored Nov 8, 2021
1 parent 584a6bf commit 0f46d1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ exports.getMessageTitle = function(msgId, msg) {
if (msg.content.title)
return msg.content.title
else if (msg.content.text) {
if (!msg.content.text.lastIndexOf) {
console.log("Encountered message with text not a string:")
console.log(msg)
return msgId
}
const maxLength = 40
const breakCharacters = ' .,/[]()#'
var lastBreakChar = 0
Expand Down

0 comments on commit 0f46d1e

Please sign in to comment.