Verified Commit e34a9031 authored by Agate's avatar Agate 💬

Fixed error when accessing profile for anonymous users

parent a389dfcd
......@@ -74,7 +74,7 @@
<translate translate-context="Content/Moderation/Link">Open in moderation interface</translate>
</router-link>
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/album/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......
......@@ -85,7 +85,7 @@
<translate translate-context="Content/Moderation/Link">Open in moderation interface</translate>
</router-link>
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/artist/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......
......@@ -93,7 +93,7 @@
<translate translate-context="Content/Moderation/Link">Open in moderation interface</translate>
</router-link>
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/track/${track.id}`)"
target="_blank" rel="noopener noreferrer">
......
......@@ -35,7 +35,7 @@
<i class="dropdown icon"></i>
<div class="menu">
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/album/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......
......@@ -34,7 +34,7 @@
<i class="dropdown icon"></i>
<div class="menu">
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/artist/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......
......@@ -27,7 +27,7 @@
<div class="ui icon buttons">
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="ui labeled icon button"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/library/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......@@ -38,7 +38,7 @@
<i class="dropdown icon"></i>
<div class="menu">
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/library/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......
......@@ -34,7 +34,7 @@
<i class="dropdown icon"></i>
<div class="menu">
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/track/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......
......@@ -28,7 +28,7 @@
<div class="ui icon buttons">
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="ui labeled icon button"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/upload/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......@@ -39,7 +39,7 @@
<i class="dropdown icon"></i>
<div class="menu">
<a
v-if="$store.state.auth.profile.is_superuser"
v-if="$store.state.auth.profile && $store.state.auth.profile.is_superuser"
class="basic item"
:href="$store.getters['instance/absoluteUrl'](`/api/admin/music/upload/${object.id}`)"
target="_blank" rel="noopener noreferrer">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment