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:
2025-05-11 21:42:48 -04:00
parent e226a37251
commit 799f22e989
4 changed files with 22 additions and 20 deletions

View File

@ -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}