git ssb

9+

cel / ssb-viewer



Commit c201e35b8d6663a0a4e9ea13a1a5b0d465d3b9d5

Better error handling for malformed vote messages

Anders Rune Jensen committed on 4/25/2018, 1:58:23 PM
Parent: e525414d1f2edc4363b7e94b7b4da1252e853026

Files changed

index.jschanged
index.jsView
@@ -355,9 +355,9 @@
355355 cb(null, msg)
356356 }
357357
358358 function addVoteMessage(msg, cb) {
359- if (msg.value.content.type == 'vote' && msg.value.content.vote.link[0] == '%')
359 + if (msg.value.content.type == 'vote' && msg.value.content.vote && msg.value.content.vote.link[0] == '%')
360360 getMsg(msg.value.content.vote.link, function (err, linkedMsg) {
361361 if (linkedMsg)
362362 msg.value.content.vote.linkedText = linkedMsg.value.content.text
363363 cb(null, msg)

Built with git-ssb-web