Skip to content

Commit

Permalink
regression: wrong usage of db batch (#5997)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello authored Nov 14, 2024
1 parent 28e714d commit 1abd1b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/methods/getCustomEmojis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const updateEmojis = async ({ update = [], remove = [], allRecords }: IUpdateEmo

try {
await db.write(async () => {
await db.batch(emojisToCreate, ...emojisToUpdate, ...emojisToDelete);
await db.batch([...emojisToCreate, ...emojisToUpdate, ...emojisToDelete]);
});
return true;
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/methods/loadThreadMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function loadThreadMessages({ tmid, rid }: { tmid: string; rid: string })
});

await db.write(async () => {
await db.batch(threadMessagesToCreate, ...threadMessagesToUpdate);
await db.batch([...threadMessagesToCreate, ...threadMessagesToUpdate]);
});
} catch (e) {
log(e);
Expand Down

0 comments on commit 1abd1b3

Please sign in to comment.