git ssb

16+

Dominic / patchbay



Commit 2cf1bb74f569e4953eff4eac2b041cae2ca62b6b

Show error loading thread

Charles Lehner authored on 7/2/2016, 5:07:52 PM
cel committed on 11/27/2016, 2:05:36 AM
Parent: dea3d20f5c389390227401809a5db4c76f77db09

Files changed

modules_basic/thread.jschanged
modules_basic/thread.jsView
@@ -35,8 +35,9 @@
3535 //in this case, it's inconvienent that panel only takes
3636 //a stream. maybe it would be better to accept an array?
3737
3838 sbot_get(root, function (err, value) {
39 + if (err) return cb(err)
3940 var msg = {key: root, value: value}
4041 // if(value.content.root) return getThread(value.content.root, cb)
4142
4243 pull(
@@ -87,15 +88,17 @@
8788 //would probably be better keep an id for each message element
8889 //(i.e. message key) and then update it if necessary.
8990 //also, it may have moved (say, if you received a missing message)
9091 content.innerHTML = ''
92 + if(err) return content.appendChild(h('pre', err.stack))
93 +
9194 //decrypt
9295 thread = thread.map(function (msg) {
9396 return 'string' === typeof msg.value.content ? message_unbox(msg) : msg
9497 })
9598
9699 if(err) return content.appendChild(h('pre', err.stack))
97- sort(thread).map(message_render).filter(Boolean).forEach(function (el) {
100 + sort(thread).map(message_render).forEach(function (el) {
98101 content.appendChild(el)
99102 })
100103
101104 var branches = sort.heads(thread)

Built with git-ssb-web