diff options
author | James Hu <51237606+jameshu111@users.noreply.github.com> | 2023-06-26 10:37:11 -0400 |
---|---|---|
committer | James Hu <51237606+jameshu111@users.noreply.github.com> | 2023-06-26 10:37:11 -0400 |
commit | 5f44a6cf1f16023a4c39872f2ccfc129c65ea812 (patch) | |
tree | a90a3b8bf986cf8ea8a67016b9ceb5e01d3841c2 /src/fields/URLField.ts | |
parent | 1bc15f9b408d35639cea37ea1c29e7cdbd326301 (diff) |
temp working version
Diffstat (limited to 'src/fields/URLField.ts')
-rw-r--r-- | src/fields/URLField.ts | 2 |
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; } |