Skip to content

Commit

Permalink
PER-9260: Protect against missing files
Browse files Browse the repository at this point in the history
Co-authored-by: Natalie Martin <[email protected]>
  • Loading branch information
cecilia-donnelly and meisekimiu committed May 16, 2023
1 parent 93f93ee commit 490161b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/shared/components/thumbnail/thumbnail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export class ThumbnailComponent
this.item.FileVOs
) {
const fullSizeImage = this.chooseFullSizeImage(this.item);
if (fullSizeImage == null) {
return;
}
this.viewer = OpenSeaDragon({
element: resizableImageElement as HTMLElement,
prefixUrl: 'assets/openseadragon/images/',
Expand Down Expand Up @@ -214,7 +217,7 @@ export class ThumbnailComponent
).fileURL;
return convertedUrl;
} else {
return record.FileVOs[0].fileURL;
return record.FileVOs[0]?.fileURL;
}
}
}

0 comments on commit 490161b

Please sign in to comment.