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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user