Commit 5d532aa9c486a50cd8f14bc6ed99c16741f71391
Handle not yet named avatars
Anders Rune Jensen committed on 12/16/2016, 7:52:57 AMParent: 3fdad99f31266c5367fed2b2d4b8c38079e09814
Files changed
modules_basic/avatar-name.js | changed |
modules_basic/avatar-name.js | ||
---|---|---|
@@ -8,9 +8,9 @@ | ||
8 | 8 … | |
9 | 9 … | exports.create = function (api) { |
10 | 10 … | |
11 | 11 … | return function name (id) { |
12 | - var n = h('span', id.substring(0, 10)) | |
12 … | + var n = h('span', id ? id.substring(0, 10) : "") | |
13 | 13 … | |
14 | 14 … | //choose the most popular name for this person. |
15 | 15 … | //for anything like this you'll see I have used sbot.links2 |
16 | 16 … | //which is the ssb-links plugin. as you'll see the query interface |
Built with git-ssb-web