Skip to content

Commit

Permalink
[ACS-8841] fix viewer rendering for doc files
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-web-ua committed Sep 27, 2024
1 parent da44b4c commit fd78279
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ describe('AlfrescoViewerComponent', () => {
});

describe('mimeType', () => {
it('should set mime type based on nodeData content', async () => {
it('should set mime type based on renditionMimeType rather then nodeData', async () => {
const defaultNode: Node = {
id: 'mock-id',
name: 'Mock Node',
Expand All @@ -496,7 +496,7 @@ describe('AlfrescoViewerComponent', () => {
spyOn(renditionService, 'getNodeRendition').and.returnValue(
Promise.resolve({
url: '',
mimeType: ''
mimeType: 'application/pdf'
})
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {

const nodeMimeType = nodeData?.content?.mimeType;
const renditionMimeType = nodeRendition.mimeType;
mimeType = nodeMimeType || renditionMimeType;
mimeType = renditionMimeType || nodeMimeType;
}
} else if (viewerType === 'media') {
this.tracks = await this.renditionService.generateMediaTracksRendition(this.nodeId);
Expand Down

0 comments on commit fd78279

Please sign in to comment.