diff --git a/src/app/share-preview/components/share-preview/share-preview.component.spec.ts b/src/app/share-preview/components/share-preview/share-preview.component.spec.ts index 49e4c98a0..f4a97490c 100644 --- a/src/app/share-preview/components/share-preview/share-preview.component.spec.ts +++ b/src/app/share-preview/components/share-preview/share-preview.component.spec.ts @@ -94,6 +94,7 @@ describe('SharePreviewComponent', () => { mockRoute.snapshot.data = { sharePreviewVO: { ArchiveVO: {}, + FolderVO: {}, AccountVO: { fullName: 'Sharer Name' }, ShareVO: { accessRole: 'viewer', status: 'pending' }, status: 'pending', diff --git a/src/app/share-preview/components/share-preview/share-preview.component.ts b/src/app/share-preview/components/share-preview/share-preview.component.ts index 1b8c51ceb..a0befe991 100644 --- a/src/app/share-preview/components/share-preview/share-preview.component.ts +++ b/src/app/share-preview/components/share-preview/share-preview.component.ts @@ -197,9 +197,15 @@ export class SharePreviewComponent implements OnInit, OnDestroy { this.isUnlistedShare = await this.shareLinksService.isUnlistedShare(); if (this.isUnlistedShare) { - this.ephemeralFolder = await this.filesystemService.getFolder( - this.route.snapshot.data.sharePreviewVO.FolderVO, - ); + if (this.route.snapshot.data.sharePreviewVO?.FolderVO) { + this.ephemeralFolder = await this.filesystemService.getFolder( + this.route.snapshot.data.sharePreviewVO.FolderVO, + ); + } else { + this.ephemeralFolder = this.route.snapshot.data.currentFolder; + this.ephemeralFolder.folderId = + this.route.snapshot.data.sharePreviewVO?.RecordVO?.parentFolderId; + } this.dataService.ephemeralFolder = this.ephemeralFolder; this.dataService.pushBreadcrumbFolder(this.ephemeralFolder); } diff --git a/src/app/share-preview/resolves/preview-resolve.service.ts b/src/app/share-preview/resolves/preview-resolve.service.ts index 97620d803..e0e07295b 100644 --- a/src/app/share-preview/resolves/preview-resolve.service.ts +++ b/src/app/share-preview/resolves/preview-resolve.service.ts @@ -91,9 +91,9 @@ export class PreviewResolveService { if (!sharePreviewVO.previewToggle && !showPreview) { const dummy = dummyItems[0]; record = cloneDeep(record); - record.thumbURL200 = dummy.thumbURL200; - record.thumbURL500 = dummy.thumbURL500; - record.thumbURL1000 = dummy.thumbURL1000; + record.thumbURL200 = record.thumbURL200 || dummy.thumbURL200; + record.thumbURL500 = record.thumbURL500 || dummy.thumbURL500; + record.thumbURL1000 = record.thumbURL1000 || dummy.thumbURL1000; record.archiveNbr = dummy.archiveNbr; }