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

@ -242,8 +242,13 @@ class TfProfileElement extends LitElement {
</div>
</div>`
: null;
let image =
typeof profile.image == 'string' ? profile.image : profile.image?.link;
let image =profile.image;
if (typeof image == 'string' && !image.startsWith('&')) {
try {
image = JSON.parse(image)?.link;
} catch {
}
}
image = this.editing?.image ?? image;
let description = this.editing?.description ?? profile.description;
return html`<div class="w3-card-4 w3-container w3-theme-d3" style="box-sizing: border-box">