git ssb

9+

cel / ssb-viewer



Commit a9e06b4bb4998dd8d49719b457f4ac031dcc44c8

Fix crash when voting on a non-msg link

Anders Rune Jensen committed on 4/21/2017, 7:26:06 PM
Parent: 16d0981db7d404a6b2f805dab96db84bb47597d8

Files changed

index.jschanged
index.jsView
@@ -271,9 +271,9 @@
271271 cb(null, msg)
272272 }
273273
274274 function addVoteMessage(msg, cb) {
275- if (msg.value.content.type == 'vote')
275 + if (msg.value.content.type == 'vote' && msg.value.content.vote.link[0] == '%')
276276 getMsg(msg.value.content.vote.link, function (err, linkedMsg) {
277277 if (err) return cb(err)
278278 msg.value.content.vote.linkedText = linkedMsg.value.content.text
279279 cb(null, msg)

Built with git-ssb-web