diff options
author | bobzel <zzzman@gmail.com> | 2024-04-23 18:35:59 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-23 18:35:59 -0400 |
commit | 9d69ab27de83ead3e499edc9028ba85749407a1e (patch) | |
tree | fb7337fc899549665d6c7634435bc7ce518a58f9 /src/fields/URLField.ts | |
parent | 9e809f8748d1812bb03ec6471aa6f97467f8f75a (diff) |
more lint cleanup
Diffstat (limited to 'src/fields/URLField.ts')
-rw-r--r-- | src/fields/URLField.ts | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/fields/URLField.ts b/src/fields/URLField.ts index c6c51957d..3a83e7ca0 100644 --- a/src/fields/URLField.ts +++ b/src/fields/URLField.ts @@ -16,16 +16,18 @@ export abstract class URLField extends ObjectField { @serializable(url()) readonly url: URL; - constructor(url: string); - constructor(url: URL); - constructor(url: URL | string) { + constructor(urlVal: string); + // eslint-disable-next-line @typescript-eslint/no-shadow + constructor(urlVal: URL); + // eslint-disable-next-line @typescript-eslint/no-shadow + constructor(urlVal: URL | string) { super(); this.url = - typeof url !== 'string' - ? url // it's an URL - : url.startsWith('http') - ? new URL(url) - : new URL(url, window.location.origin); + typeof urlVal !== 'string' + ? urlVal // it's an URL + : urlVal.startsWith('http') + ? new URL(urlVal) + : new URL(urlVal, window.location.origin); } [ToScriptString]() { |