mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-22 06:41:46 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user