forked from cory/tildefriends
ssb: The updated fetch_abouts means that image JSON is now a string we need to handle in tf-user / tf-profile.
This commit is contained in:
@ -38,8 +38,12 @@ class TfUserElement extends LitElement {
|
||||
|
||||
if (user) {
|
||||
let image_link = user.image;
|
||||
image_link =
|
||||
typeof image_link == 'string' ? image_link : image_link?.link;
|
||||
if (typeof image_link == 'string' && !image_link.startsWith('&')) {
|
||||
try {
|
||||
image_link = JSON.parse(image_link)?.link;
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
if (image_link !== undefined) {
|
||||
image = html`<img
|
||||
class=${'w3-theme-l4 ' + shape}
|
||||
|
Reference in New Issue
Block a user