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