git ssb

2+

ev / mvd



Commit e6df6e1b2f7dfa90a55708989475b839f515ae28

render a missing message when message is missing

Ev Bogue committed on 7/4/2018, 4:43:30 PM
Parent: 6fb0136e77ef47dbeebce12754ebcf25ed3e955c

Files changed

views.jschanged
views.jsView
@@ -301,18 +301,23 @@
301301 })
302302 )
303303
304304 sbot.get(src, function (err, data) {
305- if (err) {console.log('could not find message')}
306- data.value = data
307- data.key = src
308- console.log(data)
309- var rootMsg = render(data)
305 + if (err) {
306 + var message = h('div.message', 'Missing message!')
307 + content.appendChild(message)
308 + }
309 + if (data) {
310 + data.value = data
311 + data.key = src
312 + console.log(data)
313 + var rootMsg = render(data)
310314
311- if (content.firstChild) {
312- content.insertBefore(rootMsg, content.firstChild)
313- } else {
314- content.appendChild(rootMsg)
315 + if (content.firstChild) {
316 + content.insertBefore(rootMsg, content.firstChild)
317 + } else {
318 + content.appendChild(rootMsg)
319 + }
315320 }
316321 })
317322 }
318323

Built with git-ssb-web