fix(ui): wait for podcast object to be available before checking if we can see it

This commit is contained in:
Kasper Seweryn 2023-06-12 10:31:59 +02:00
parent 600746dd73
commit 328ae245b3
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
Fixed premature login redirect on podcast detail page (#2155)

View File

@ -103,7 +103,8 @@ watch([uuid, object], ([uuid, object], [lastUuid, lastObject]) => {
const route = useRoute() const route = useRoute()
watchEffect(() => { watchEffect(() => {
if (!store.state.auth.authenticated && store.getters['instance/domain'] !== object.value?.actor.domain) { if (!object.value) return
if (!store.state.auth.authenticated && store.getters['instance/domain'] !== object.value.actor.domain) {
router.push({ name: 'login', query: { next: route.fullPath } }) router.push({ name: 'login', query: { next: route.fullPath } })
} }
}) })