chore(deps): update dependency @antfu/eslint-config to ^2.19.0 (#2726)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com> Co-authored-by: Daniel Roe <daniel@roe.dev>
This commit is contained in:
parent
23f82d3296
commit
0fba07e6e5
32 changed files with 820 additions and 710 deletions
|
@ -27,7 +27,7 @@ function isValidUrl(str: string) {
|
|||
new URL(str)
|
||||
return true
|
||||
}
|
||||
catch (err) {
|
||||
catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -42,13 +42,16 @@ async function handleInput() {
|
|||
|
||||
if (
|
||||
isValidUrl(`https://${input}`)
|
||||
&& input.match(/^[a-z0-9-]+(\.[a-z0-9-]+)+(:[0-9]+)?$/i)
|
||||
&& input.match(/^[a-z0-9-]+(\.[a-z0-9-]+)+(:\d+)?$/i)
|
||||
// Do not hide the autocomplete if a result has an exact substring match on the input
|
||||
&& !filteredServers.value.some(s => s.includes(input))
|
||||
)
|
||||
) {
|
||||
autocompleteShow.value = false
|
||||
else
|
||||
}
|
||||
|
||||
else {
|
||||
autocompleteShow.value = true
|
||||
}
|
||||
}
|
||||
|
||||
function toSelector(server: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue