Merged in fix/warmup-autocomplete-data-2 (pull request #2218)
fix: chunked data overwrote it self * fix: chunked data overwrote it self Approved-by: Linus Flood
This commit is contained in:
@@ -41,7 +41,6 @@ export const getDestinationsAutoCompleteRoute = safeProtectedServiceProcedure
|
||||
.input(destinationsAutoCompleteInputSchema)
|
||||
.query(async ({ ctx, input }): Promise<DestinationsAutoCompleteOutput> => {
|
||||
const lang = input.lang || ctx.lang
|
||||
|
||||
const locations: AutoCompleteLocation[] =
|
||||
await getAutoCompleteDestinationsData({
|
||||
lang,
|
||||
@@ -107,6 +106,7 @@ export async function getAutoCompleteDestinationsData({
|
||||
})
|
||||
|
||||
if (!countries) {
|
||||
console.error("Unable to fetch countries")
|
||||
throw new Error("Unable to fetch countries")
|
||||
}
|
||||
|
||||
@@ -142,6 +142,7 @@ export async function getAutoCompleteDestinationsData({
|
||||
!cityUrls ||
|
||||
!countryUrls
|
||||
) {
|
||||
console.error("Unable to fetch location URLs")
|
||||
throw new Error("Unable to fetch location URLs")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user