type assert bootstrapItem as min length 1

This commit is contained in:
2024-05-10 02:36:25 -05:00
parent 06e1b603fc
commit f95e0de5bb

View File

@@ -93,7 +93,8 @@ const useLookup = (warningHandler?: WarningHandler) => {
case "domain":
for (const bootstrapItem of bootstrap.services) {
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;
}
}