Commit 55e3573a7ea1640b0726134cc2a80a72d0826597
nicer format on load missing message
Matt McKegg committed on 6/30/2017, 3:03:13 AMParent: 1d5506434499529958e97634d542dbeb74756702
Files changed
modules/page/html/render/message.js | changed |
modules/page/html/render/message.js | ||
---|---|---|
@@ -36,9 +36,13 @@ | ||
36 | 36 | placeholder: when(meta.recps, 'Write a private reply', 'Write a public reply') |
37 | 37 | }) |
38 | 38 | |
39 | 39 | api.sbot.async.get(id, (err, value) => { |
40 | - if (err) return result.set(h('div', {className: 'Error'}, ['Cannot load thead'])) | |
40 | + if (err) { | |
41 | + return result.set(h('PageHeading', [ | |
42 | + h('h1', 'Cannot load thread. Root message missing.') | |
43 | + ])) | |
44 | + } | |
41 | 45 | |
42 | 46 | if (typeof value.content === 'string') { |
43 | 47 | value = api.message.sync.unbox(value) |
44 | 48 | } |
Built with git-ssb-web