fix(ui): theme panic

This commit is contained in:
trisua 2025-04-09 21:26:34 -04:00
parent 0bef301deb
commit 0615f44bfa

View file

@ -447,7 +447,7 @@ config.town_square and user %}
}); });
} }
</script> </script>
{% endif %} {%- endmacro %} {% macro theme(user) -%} {% if {% endif %} {%- endmacro %} {% macro theme(user) -%} {% if user %} {% if
user.settings.theme_hue %} user.settings.theme_hue %}
<style> <style>
:root, * { :root, * {
@ -467,6 +467,7 @@ user.settings.theme_hue %}
} }
</style> </style>
{% if user.settings.theme_preference %}
<script> <script>
function match_user_theme() { function match_user_theme() {
const pref = "{{ profile.settings.theme_preference }}".toLowercase(); const pref = "{{ profile.settings.theme_preference }}".toLowercase();
@ -482,4 +483,4 @@ user.settings.theme_hue %}
match_user_theme(); match_user_theme();
}, 150); }, 150);
</script> </script>
{% endif %} {%- endmacro %} {% endif %} {% endif %} {% endif %} {%- endmacro %}