fix: move title check to response
This commit is contained in:
@@ -37,10 +37,6 @@ async function getLoyaltyPageBreadcrumbs(variables: Variables) {
|
||||
variables
|
||||
)
|
||||
|
||||
if (!refsResponse.data.all_loyalty_page.items[0].web?.breadcrumbs?.title) {
|
||||
return []
|
||||
}
|
||||
|
||||
const validatedRefsData =
|
||||
validateLoyaltyPageBreadcrumbsRefsContentstackSchema.safeParse(
|
||||
refsResponse.data
|
||||
@@ -57,7 +53,9 @@ async function getLoyaltyPageBreadcrumbs(variables: Variables) {
|
||||
variables,
|
||||
tags
|
||||
)
|
||||
|
||||
if (!response.data.all_loyalty_page.items[0].web?.breadcrumbs?.title) {
|
||||
return []
|
||||
}
|
||||
const validatedBreadcrumbsData =
|
||||
validateLoyaltyPageBreadcrumbsContentstackSchema.safeParse(response.data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user