git ssb

0+

Daan Patchwork / ssb-viewer



forked from cel / ssb-viewer

Commit d58d389db2b0ad64c23c3707659c5f9d00b0e9ed

Fix crash on wierd non-string names

Anders Rune Jensen committed on 4/30/2018, 1:00:00 PM
Parent: 86801890069c72884af76b73462e38b8b85697db

Files changed

lib/about.jschanged
lib/about.jsView
@@ -25,9 +25,9 @@
2525 var author = msg.value.author
2626 var c = msg.value.content
2727 if (!c) return
2828 var feedAbout = aboutByFeed[author] || (aboutByFeed[author] = {})
29- if (c.name) feedAbout.name = c.name.replace(/^@?/, '@')
29+ if (typeof c.name == 'string') feedAbout.name = c.name.replace(/^@?/, '@')
3030 if (c.image) feedAbout.image = linkDest(c.image)
3131 if (c.description) feedAbout.description = c.description
3232 if (c.publicWebHosting != null && author === c.about) feedAbout.publicWebHosting = defalsify(c.publicWebHosting)
3333 }, function (err) {

Built with git-ssb-web