fix: do not resolve srcset for urls (#6367)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-08-22 14:06:31 +07:00 committed by GitHub
parent 29a4276bbd
commit 0e72b85978
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,10 @@ export function getSrcSet (_blob: Ref<Blob>, width?: number): string {
} }
function blobToSrcSet (cfg: PreviewConfig, blob: Ref<Blob>, width: number | undefined): string { function blobToSrcSet (cfg: PreviewConfig, blob: Ref<Blob>, width: number | undefined): string {
if (blob.includes('://')) {
return ''
}
let url = cfg.previewUrl.replaceAll(':workspace', encodeURIComponent(getCurrentWorkspace())) let url = cfg.previewUrl.replaceAll(':workspace', encodeURIComponent(getCurrentWorkspace()))
const downloadUrl = getFileUrl(blob) const downloadUrl = getFileUrl(blob)