fix(lint): resolve eslint warnings in useArticleLoader - add comment for empty catch, use settingsRef consistently

This commit is contained in:
Gigi
2025-10-22 15:26:16 +02:00
parent c62cb21962
commit d4483a2f91

View File

@@ -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) {