Skip to content

Commit 2fa8e6a

Browse files
committed
Fix navigation to some elses private message
1 parent 321ff44 commit 2fa8e6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

message/async/name.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ exports.create = function (api) {
2424

2525
if (err && err.name === 'NotFoundError') {
2626
return cb(null, fallbackName + '...(missing)')
27-
} else if (value.content.type === 'post' && typeof value.content.text === 'string') {
27+
} else if (value && value.content.type === 'post' && typeof value.content.text === 'string') {
2828
if (value.content.text.trim()) {
2929
return cb(null, titleFromMarkdown(value.content.text, 40) || fallbackName)
3030
}
31-
} else if (typeof value.content.text === 'string') {
31+
} else if (value && typeof value.content.text === 'string') {
3232
return cb(null, value.content.type + ': ' + titleFromMarkdown(value.content.text, 30))
3333
} else {
3434
return getAboutName(id, cb)

0 commit comments

Comments
 (0)