fix: crash when selecting flairs

This commit is contained in:
Xylight committed 2025-10-21 20:42:29 -07:00
1 parent 61d4ac3128
commit e6baf76821
2 files changed
+3 -3

No files matched your search

+2 -3
View File
@@ -266,8 +266,8 @@
{#each data.community.flair_list as flair}
{@const selected = data.flair_list?.some((i) => i == flair.id)}
<button
class="rounded-full cursor-pointer hover:brightness-100"
style="background-color: {flair.background_color};"
class="rounded-full cursor-pointer hover:brightness-100 badge-tag-color"
style="--tag-color: {flair.background_color}; --tag-text-color: {flair.text_color};"
onclick={() => {
if (selected) {
const index = data.flair_list.findIndex((i) => i == flair.id)
@@ -320,7 +320,6 @@
data.community = c
}}
class="w-max"
/>
{:else}
<div class="flex flex-col gap-1">
+1
View File
@@ -35,6 +35,7 @@
nsfw: false,
title: '',
url: undefined,
flair_list: [],
}}
passedCommunity={community}
onsubmit={(e) => goto(`/post/${e.post.id}`)}