Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions message/async/name.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ exports.create = function (api) {

if (err && err.name === 'NotFoundError') {
return cb(null, fallbackName + '...(missing)')
} else if (value.content.type === 'post' && typeof value.content.text === 'string') {
} else if (value && value.content.type === 'post' && typeof value.content.text === 'string') {
if (value.content.text.trim()) {
return cb(null, titleFromMarkdown(value.content.text, 40) || fallbackName)
}
} else if (typeof value.content.text === 'string') {
} else if (value && typeof value.content.text === 'string') {
return cb(null, value.content.type + ': ' + titleFromMarkdown(value.content.text, 30))
} else {
return getAboutName(id, cb)
Expand Down