fix(webapp): fix property access of possibly undefined objects (#8639)

* Fix property access of possibly undefined objects
This commit is contained in:
Max 2025-06-25 13:58:53 +02:00 committed by GitHub
parent 2a54dc9664
commit 192bedf95a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -44,7 +44,10 @@
</ds-chip>
</div>
<!-- group categories -->
<div class="categories" v-if="categoriesActive && group.categories.length > 0">
<div
class="categories"
v-if="categoriesActive && group.categories && group.categories.length > 0"
>
<category
v-for="category in group.categories"
:key="category.id"

View File

@ -53,7 +53,10 @@
class="footer"
v-observe-visibility="(isVisible, entry) => visibilityChanged(isVisible, entry, post.id)"
>
<div class="categories" v-if="categoriesActive && post.categories.length > 0">
<div
class="categories"
v-if="categoriesActive && post.categories && post.categories.length > 0"
>
<category
v-for="category in post.categories"
:key="category.id"