fix: decouple IDB writes from network-data return path

QuotaExceededError from a full IndexedDB was being caught by the IIFE's
try/catch (after the earlier await-upsert change), causing repos to return
null/empty even when the network fetch succeeded. Fire-and-forget upserts
with .catch(()=>{}) ensure write failures never suppress fetched data.
This commit is contained in:
jubnl
2026-05-05 19:19:48 +02:00
parent f8fdb14627
commit 2ae4a18466
9 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ export const todoRepo = {
const refresh = (async () => {
try {
const result = await todoApi.list(tripId)
await upsertTodoItems(result.items)
upsertTodoItems(result.items).catch(() => {})
return result
} catch {
return null