Fixed tiles breaking if user is not logged in.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div
|
||||
class="tile"
|
||||
:class="{
|
||||
unstashed: !favorited && pageStash && user && pageStash.user.id === user.id,
|
||||
unstashed: !favorited && pageStash && user && pageStash.user.id === user?.id,
|
||||
}"
|
||||
>
|
||||
<span class="name">{{ actor.name }}</span>
|
||||
@@ -88,7 +88,7 @@ const props = defineProps({
|
||||
const pageContext = inject('pageContext');
|
||||
const { user } = pageContext;
|
||||
const pageStash = pageContext.pageProps.stash;
|
||||
const currentStash = pageStash || user.primaryStash;
|
||||
const currentStash = pageStash || user?.primaryStash;
|
||||
|
||||
const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id === currentStash.id));
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user