From 1e31b71afd1ead4644e99df6838a55481176e09a Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sun, 23 Nov 2025 16:41:43 +0100 Subject: add fonts and create-user endpoint --- static/pages/settings/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'static/pages') diff --git a/static/pages/settings/index.js b/static/pages/settings/index.js index cc985a5..36c1d09 100644 --- a/static/pages/settings/index.js +++ b/static/pages/settings/index.js @@ -87,11 +87,13 @@ export default class SettingsView extends sfw.element.Container { set profile(profile) { this.#profile = profile; - this.#profile_image.src = `/api/profile/image/load/${profile.name}`; - this.#profile_image.onerror = () => this.#profile_image.removeAttribute('src'); + if (this.#profile) { + this.#profile_image.src = `/api/profile/image/load/${profile.name}`; + this.#profile_image.onerror = () => this.#profile_image.removeAttribute('src'); - this.#name.value = profile.full_name; - this.#birthday.value = profile.birthday; + this.#name.value = profile.full_name; + this.#birthday.value = profile.birthday; + } } get profile() { -- cgit v1.2.3-70-g09d2