From d58d389db2b0ad64c23c3707659c5f9d00b0e9ed Mon Sep 17 00:00:00 2001 From: Anders Rune Jensen Date: Mon, 30 Apr 2018 15:00:00 +0200 Subject: [PATCH] Fix crash on wierd non-string names --- lib/about.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/about.js b/lib/about.js index b946979..70761c8 100644 --- a/lib/about.js +++ b/lib/about.js @@ -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)