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
@@ -11,7 +11,7 @@ export const accommodationRepo = {
const refresh = (async () => {
try {
const result = await accommodationsApi.list(tripId)
await upsertAccommodations(result.accommodations || [])
upsertAccommodations(result.accommodations || []).catch(() => {})
return result
} catch {
return null