mirror of
https://github.com/Xevion/rdap.git
synced 2025-12-07 05:16:07 -06:00
type assert bootstrapItem as min length 1
This commit is contained in:
@@ -93,7 +93,8 @@ const useLookup = (warningHandler?: WarningHandler) => {
|
|||||||
case "domain":
|
case "domain":
|
||||||
for (const bootstrapItem of bootstrap.services) {
|
for (const bootstrapItem of bootstrap.services) {
|
||||||
if (bootstrapItem[0].some(domainMatchPredicate(lookupTarget))) {
|
if (bootstrapItem[0].some(domainMatchPredicate(lookupTarget))) {
|
||||||
url = getBestURL(bootstrapItem[1]);
|
// min length of 1 is validated in zod schema
|
||||||
|
url = getBestURL(bootstrapItem[1] as [string, ...string[]]);
|
||||||
break typeSwitch;
|
break typeSwitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user