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: {
query: USER_SETTINGS,
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() {
return (
!this.currentActor.id ||
!this.event?.attributedTo ||
!this.event?.attributedTo?.preferredUsername
);

View file

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