Fix crash on wierd non-string names

This commit is contained in:
Anders Rune Jensen
2018-04-30 15:00:00 +02:00
parent 8680189006
commit d58d389db2
+1 -1
View File
@@ -26,7 +26,7 @@ module.exports = function (sbot, id, cb) {
var c = msg.value.content
if (!c) return
var feedAbout = aboutByFeed[author] || (aboutByFeed[author] = {})
if (c.name) feedAbout.name = c.name.replace(/^@?/, '@')
if (typeof c.name == 'string') feedAbout.name = c.name.replace(/^@?/, '@')
if (c.image) feedAbout.image = linkDest(c.image)
if (c.description) feedAbout.description = c.description
if (c.publicWebHosting != null && author === c.about) feedAbout.publicWebHosting = defalsify(c.publicWebHosting)