Fix some queries being called even when not logged-in

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-08-13 16:56:51 +02:00
parent 4831379d13
commit d71e76d692
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
3 changed files with 5 additions and 2 deletions

View File

@ -216,7 +216,7 @@ import RouteName from "../router/name";
loggedUser: { loggedUser: {
query: USER_SETTINGS, query: USER_SETTINGS,
skip() { skip() {
return this.currentUser.isLoggedIn === false; return !this.currentUser || this.currentUser.isLoggedIn === false;
}, },
}, },
}, },

View File

@ -592,6 +592,7 @@ import { eventMetaDataList } from "../../services/EventMetadata";
}, },
skip() { skip() {
return ( return (
!this.currentActor.id ||
!this.event?.attributedTo || !this.event?.attributedTo ||
!this.event?.attributedTo?.preferredUsername !this.event?.attributedTo?.preferredUsername
); );

View File

@ -372,7 +372,9 @@ import Subtitle from "../components/Utils/Subtitle.vue";
currentUser: CURRENT_USER_CLIENT, currentUser: CURRENT_USER_CLIENT,
loggedUser: { loggedUser: {
query: USER_SETTINGS, query: USER_SETTINGS,
fetchPolicy: "no-cache", skip() {
return !this.currentUser || this.currentUser.isLoggedIn === false;
},
error() { error() {
return null; return null;
}, },