diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-23 16:41:43 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-23 16:41:43 +0100 |
| commit | 1e31b71afd1ead4644e99df6838a55481176e09a (patch) | |
| tree | f1107a55f2b2f6ed838190ac259cd5b698bcc56f /static/pages/settings | |
| parent | 2e8f59aaeb731dd726f8d49d120ae4cc8a7cf512 (diff) | |
add fonts and create-user endpoint
Diffstat (limited to 'static/pages/settings')
| -rw-r--r-- | static/pages/settings/index.js | 10 |
1 files changed, 6 insertions, 4 deletions
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() { |