Skip to content
Snippets Groups Projects
Unverified Commit dff6d180 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento Committed by GitHub
Browse files

regression: Fix UI crashing on Desktop app when a file is present in a room (#32723)

parent 0eb686fd
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ const GenericFileAttachment = ({
event.preventDefault();
if (format === 'PDF') {
const url = new URL(getURL(link));
const url = new URL(getURL(link), window.location.origin);
url.searchParams.set('contentDisposition', 'inline');
openDocumentViewer(url.toString(), format, '');
return;
......@@ -57,7 +57,7 @@ const GenericFileAttachment = ({
if (!hasDownload || !link) return undefined;
if (openDocumentViewer) {
const url = new URL(getURL(link), window.location.host);
const url = new URL(getURL(link), window.location.origin);
url.searchParams.set('download', '');
return url.toString();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment