From b19c19d10f6543b6678f12ca6109220e1ac5b284 Mon Sep 17 00:00:00 2001 From: Kristina Fefelova Date: Thu, 26 Dec 2024 14:16:42 +0400 Subject: [PATCH] Fix videos Signed-off-by: Kristina Fefelova --- plugins/love-resources/src/stores.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/love-resources/src/stores.ts b/plugins/love-resources/src/stores.ts index 1e77d61a97..365ed21185 100644 --- a/plugins/love-resources/src/stores.ts +++ b/plugins/love-resources/src/stores.ts @@ -81,7 +81,8 @@ export const storePromise = writable>(new Promise((resolve) => {}) function fillStores (): void { const client = getClient() - if (client !== undefined || getCurrentAccount() != null) { + const account = getCurrentAccount() as PersonAccount | null + if (client !== undefined && account != null) { const query = createQuery(true) const roomPromise = new Promise((resolve) => query.query(love.class.Room, {}, (res) => { @@ -107,7 +108,7 @@ function fillStores (): void { const requestPromise = new Promise((resolve) => requestsQuery.query( love.class.JoinRequest, - { person: (getCurrentAccount() as PersonAccount).person, status: RequestStatus.Pending }, + { person: account.person, status: RequestStatus.Pending }, (res) => { myRequests.set(res) resolve()