Commit d58d389db2b0ad64c23c3707659c5f9d00b0e9ed
Fix crash on wierd non-string names
Anders Rune Jensen committed on 4/30/2018, 1:00:00 PMParent: 86801890069c72884af76b73462e38b8b85697db
Files changed
lib/about.js | changed |
lib/about.js | ||
---|---|---|
@@ -25,9 +25,9 @@ | ||
25 | 25 | var author = msg.value.author |
26 | 26 | var c = msg.value.content |
27 | 27 | if (!c) return |
28 | 28 | 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(/^@?/, '@') | |
30 | 30 | if (c.image) feedAbout.image = linkDest(c.image) |
31 | 31 | if (c.description) feedAbout.description = c.description |
32 | 32 | if (c.publicWebHosting != null && author === c.about) feedAbout.publicWebHosting = defalsify(c.publicWebHosting) |
33 | 33 | }, function (err) { |
Built with git-ssb-web