Commit b39e6bdb22180e6de03344b285238d49ec5ed7c1
throw err if no avatar
Ev Bogue committed on 6/25/2018, 2:33:28 PMParent: e1c58a0d0b79ef620830a1e5a77bb358200dc605
Files changed
avatar.js | changed |
avatar.js | ||
---|---|---|
@@ -15,8 +15,9 @@ | ||
15 | 15 | |
16 | 16 | var avatarname = h('span', key.substring(0, 10)) |
17 | 17 | |
18 | 18 | avatar(sbot, id, key, function (err, data) { |
19 | + if (err) throw err | |
19 | 20 | if (data.name) { |
20 | 21 | if (data.name[0] != '@') { |
21 | 22 | var name = '@' + data.name |
22 | 23 | } else { |
@@ -33,8 +34,9 @@ | ||
33 | 34 | module.exports.image = function (key) { |
34 | 35 | var img = visualize(new Buffer(key.substring(1), 'base64'), 256) |
35 | 36 | |
36 | 37 | avatar(sbot, id, key, function (err, data) { |
38 | + if (err) throw err | |
37 | 39 | if (data.image) { |
38 | 40 | localStorage[key + 'image'] = data.image |
39 | 41 | img.src = config.blobsUrl + data.image |
40 | 42 | } |
Built with git-ssb-web