Commit b1da73e22bda6761baeced6c02888d038c2f9ace
fix names counter on profile
mix irving committed on 1/25/2017, 8:07:55 AMParent: b5cf9912e3e6845bf8f4aeeebea6559069eeb23d
Files changed
modules_basic/avatar/edit.js | changed |
modules_basic/avatar/edit.js | |||
---|---|---|---|
@@ -66,15 +66,16 @@ | |||
66 | 66 … | pull.filter(e => e && 'string' == typeof e.link), | |
67 | 67 … | pull.unique('link'), | |
68 | 68 … | pull.drain(image => images.push(image) ) | |
69 | 69 … | ) | |
70 … | + | ||
70 | 71 … | var namesRecord = MutantObject() | |
71 | 72 … | pull( | |
72 | 73 … | api.sbot_links({dest: id, rel: 'about', values: true}), | |
73 | 74 … | pull.map(e => e.value.content.name), | |
74 | 75 … | pull.filter(Boolean), | |
75 | 76 … | pull.drain(name => { | |
76 | - var n = namesRecord.get('name') || 0 | ||
77 … | + var n = namesRecord.get(name) || 0 | ||
77 | 78 … | namesRecord.put(name, n+1) | |
78 | 79 … | }) | |
79 | 80 … | ) | |
80 | 81 … | var names = dictToCollection(namesRecord) |
Built with git-ssb-web