aboutsummaryrefslogtreecommitdiff
path: root/src/fields/URLField.ts
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-07-19 14:18:06 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-07-19 14:18:06 -0400
commitfb7a5724eec129b8a05d14e8dd58baaa5e15eb30 (patch)
treec63eeb61b752704f21145ae809675224b7547b82 /src/fields/URLField.ts
parente0c100ecb1fe2b16209e955911f7e8267a2535ef (diff)
parent7c1017f15b9c0ad09d3e0185e310733ab7c10c09 (diff)
Merge branch 'james-azure-image' into sophie-report-manager
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;
}