aboutsummaryrefslogtreecommitdiff
path: root/src/fields/URLField.ts
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-07-20 01:11:44 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-07-20 01:11:44 -0400
commit0ca5a86e6f9ff85a32de109105b241d613aae326 (patch)
tree47504f51a7c195735a858cf0a8e0f76c3a81175e /src/fields/URLField.ts
parente11aa60b774d457cb016bb0f375ce092f0a733af (diff)
parentea217200f1c42e4d4b142abc9abd55ca49535c49 (diff)
Merge branch 'sophie-report-manager' into sophie-ai-images
Diffstat (limited to 'src/fields/URLField.ts')
-rw-r--r--src/fields/URLField.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/URLField.ts b/src/fields/URLField.ts
index 8ac20b1e5..8db4d6003 100644
--- a/src/fields/URLField.ts
+++ b/src/fields/URLField.ts
@@ -25,7 +25,7 @@ export abstract class URLField extends ObjectField {
constructor(url: URL | string) {
super();
if (typeof url === 'string') {
- url = url.startsWith('http') ? new URL(url) : new URL(url, window.location.origin);
+ url = (url.startsWith('http') || url.startsWith('https')) ? new URL(url) : new URL(url, window.location.origin);
}
this.url = url;
}