fix: fix label styling

fix: handle primary color not being there
This commit is contained in:
Andy Burke 2025-09-16 20:11:42 -07:00
parent f03ca66a07
commit e1bb07a138
3 changed files with 9 additions and 9 deletions

View file

@ -199,7 +199,7 @@
user_bound_element[target] = value ?? default_value;
}
const primary_color_setting = user.meta.primary_color;
const primary_color_setting = user?.meta?.primary_color;
if (primary_color_setting) {
const root = document.querySelector(":root");
root.style.setProperty("--base-color", primary_color_setting);
@ -376,7 +376,7 @@
data-user-field-target="value"
data-user-field-default=""
/>
<label for="user-color-setting-primary">Primary Color</label>
<label class="placeholder" for="user-color-setting-primary">Primary Color</label>
</div>
</details>
</form>