diff --git a/src/masto/timelines.ts b/src/masto/timelines.ts index 1aaefb1..6e5eb9b 100644 --- a/src/masto/timelines.ts +++ b/src/masto/timelines.ts @@ -26,7 +26,9 @@ export function createTimelineControlsForArray( const [threads, setThreads] = createStore([] as mastodon.v1.Status["id"][]); createEffect(() => { - const nls = status(); + const nls = catchError(status, (e) => { + console.error(e); + }); if (!nls) return; setThreads([]); @@ -226,9 +228,7 @@ export type TimelineControls = { set(id: string, value: mastodon.v1.Status): void; }; -export type TimelineResource< - R, -> = [ +export type TimelineResource = [ TimelineControls, Resource, { refetch(info?: TimelineFetchDirection): void }, @@ -238,7 +238,7 @@ export type TimelineResource< * Create auto managed timeline controls. * * The error from the resource is not thrown in the - * {@link TimelineControls.list} and {@link TimelineControls}.get*. + * {@link TimelineControls["list"]} and {@link TimelineControls}.get*. * Use the second value from {@link TimelineResource} to catch the error. */ export function createTimeline<