git ssb

16+

Dominic / patchbay



Commit b7cfda1f1985477fd342a7651020c340ee0325f1

handle weird about messages where name/description are objects and not strings

Joran authored on 11/14/2018, 8:28:31 PM
Christian Bundy committed on 11/14/2018, 9:13:59 PM
Parent: 811ef64cd3120bacda2030709c8f86850a10fe6f

Files changed

message/html/render/about.jschanged
message/html/render/about.jsView
@@ -41,8 +41,14 @@
4141 // TODO : build better normalizers
4242 if (image && ref.isBlob(image.link)) image = image.link
4343 about = about || link
4444
45 + // Safety check - are the incoming things actually text
46 + if(typeof name != 'string')
47 + name = undefined
48 + if(typeof description != 'string')
49 + description = undefined
50 +
4551 const metaData = [
4652 name ? h('div', [ h('strong', 'Name: '), name ]) : undefined,
4753 description ? h('div', [ h('strong', 'Description: '), description ]) : undefined,
4854 image ? h('img', { src: api.blob.sync.url(image), style: { 'margin-top': '.5rem' } }) : undefined

Built with git-ssb-web