mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 15:14:20 +01:00
fix(lint): resolve eslint warnings in useArticleLoader - add comment for empty catch, use settingsRef consistently
This commit is contained in:
@@ -89,7 +89,12 @@ export function useArticleLoader({
|
|||||||
if (currentRequestIdRef.current !== requestId) return
|
if (currentRequestIdRef.current !== requestId) return
|
||||||
|
|
||||||
// Store in event store for future local reads
|
// Store in event store for future local reads
|
||||||
try { eventStore?.add?.(evt as unknown as any) } catch {}
|
try {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
eventStore?.add?.(evt as unknown as any)
|
||||||
|
} catch {
|
||||||
|
// Silently ignore store errors
|
||||||
|
}
|
||||||
|
|
||||||
// Keep latest by created_at
|
// Keep latest by created_at
|
||||||
if (!latestEvent || evt.created_at > latestEvent.created_at) {
|
if (!latestEvent || evt.created_at > latestEvent.created_at) {
|
||||||
@@ -186,7 +191,7 @@ export function useArticleLoader({
|
|||||||
return next.sort((a, b) => b.created_at - a.created_at)
|
return next.sort((a, b) => b.created_at - a.created_at)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
settings
|
settingsRef.current
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user