Commit 7d58542a9f0765a6a828a016717dc9924232228c
Merge pull request #45 from ssbc/fix-nav-to-other-private
Fix crash on viewing some elses private messageMatt McKegg authored on 11/23/2017, 7:24:05 PM
GitHub committed on 11/23/2017, 7:24:05 PM
Parent: 321ff445a5b366b73b352edce4768d6744ae7283
Parent: 2fa8e6a002f4394a9059d775c6b7e5655de35e76
Files changed
message/async/name.js | changed |
message/async/name.js | |||
---|---|---|---|
@@ -23,13 +23,13 @@ | |||
23 | 23 … | } | |
24 | 24 … | ||
25 | 25 … | if (err && err.name === 'NotFoundError') { | |
26 | 26 … | 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') { | ||
28 | 28 … | if (value.content.text.trim()) { | |
29 | 29 … | return cb(null, titleFromMarkdown(value.content.text, 40) || fallbackName) | |
30 | 30 … | } | |
31 | - } else if (typeof value.content.text === 'string') { | ||
31 … | + } else if (value && typeof value.content.text === 'string') { | ||
32 | 32 … | return cb(null, value.content.type + ': ' + titleFromMarkdown(value.content.text, 30)) | |
33 | 33 … | } else { | |
34 | 34 … | return getAboutName(id, cb) | |
35 | 35 … | } |
Built with git-ssb-web