fix: TypeError cannot read properties of undefined (reading 'id') (#9947)

This commit is contained in:
Sivin Varghese
2024-08-13 16:28:41 +05:30
committed by GitHub
parent b33d59d804
commit 7ff939efd5

View File

@@ -13,8 +13,8 @@ export default {
const accountLabels = useMapGetter('labels/getLabels'); const accountLabels = useMapGetter('labels/getLabels');
const activeLabels = computed(() => { const activeLabels = computed(() => {
return props.conversationLabels.map(label => return accountLabels.value.filter(({ title }) =>
accountLabels.value.find(l => l.title === label) props.conversationLabels.includes(title)
); );
}); });
@@ -83,7 +83,7 @@ export default {
<slot name="before" /> <slot name="before" />
<woot-label <woot-label
v-for="(label, index) in activeLabels" v-for="(label, index) in activeLabels"
:key="label.id" :key="label ? label.id : index"
:title="label.title" :title="label.title"
:description="label.description" :description="label.description"
:color="label.color" :color="label.color"