Skip to content

Commit 76eaee3

Browse files
authored
fix: timeline scroll error handling (immich-app#21324)
1 parent d5fec0e commit 76eaee3

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

web/src/lib/managers/timeline-manager/timeline-manager.svelte.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,14 +419,22 @@ export class TimelineManager {
419419
if (!this.isInitialized) {
420420
await this.initTask.waitUntilCompletion();
421421
}
422+
422423
let { monthGroup } = findMonthGroupForAssetUtil(this, id) ?? {};
423424
if (monthGroup) {
424425
return monthGroup;
425426
}
426-
const asset = toTimelineAsset(await getAssetInfo({ ...authManager.params, id }));
427+
428+
const response = await getAssetInfo({ ...authManager.params, id }).catch(() => null);
429+
if (!response) {
430+
return;
431+
}
432+
433+
const asset = toTimelineAsset(response);
427434
if (!asset || this.isExcluded(asset)) {
428435
return;
429436
}
437+
430438
monthGroup = await this.#loadMonthGroupAtTime(asset.localDateTime, { cancelable: false });
431439
if (monthGroup?.findAssetById({ id })) {
432440
return monthGroup;

0 commit comments

Comments
 (0)