From a0d08e5041bd24027b7b05ee22f2db09d3acce87 Mon Sep 17 00:00:00 2001 From: Jannik Date: Sat, 27 Sep 2025 12:12:42 +0200 Subject: [PATCH] fix(stores): error with undefined user --- src/stores.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores.ts b/src/stores.ts index 15fa59b..16ee67c 100644 --- a/src/stores.ts +++ b/src/stores.ts @@ -66,7 +66,7 @@ export async function sync(payload: SyncPayload, user: User) { const changes: Store[] = []; // Apply changes from client for(const change of payload.changes) { - const store = await Store.findOneBy({ id: change.id }); + const store = await Store.findOne({ where: { id: change.id }, relations: { user: true } }); if(!store) { // Store doesn't exist, create it const newStore = new Store();