make sure only to prepend relative URLs (#18998)

This commit is contained in:
Niels Lyngsø
2025-04-10 15:56:14 +02:00
committed by GitHub
parent ba0028c03d
commit 97b3023e14

View File

@@ -78,7 +78,12 @@ export class UmbInputImageCropperFieldElement extends UmbLitElement {
get source(): string {
if (this.src) {
return `${this._serverUrl}${this.src}`;
// Test that URL is relative:
if (this.src.startsWith('/')) {
return `${this._serverUrl}${this.src}`;
} else {
return this.src;
}
}
return this.fileDataUrl ?? '';