fix: add same title check for mypages
This commit is contained in:
@@ -53,9 +53,11 @@ 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)
|
||||
|
||||
@@ -84,12 +86,17 @@ async function getMyPagesBreadcrumbs(variables: Variables) {
|
||||
}
|
||||
|
||||
const tags = getTags(validatedRefsData.data.all_account_page, variables)
|
||||
|
||||
const response = await getResponse<GetMyPagesBreadcrumbsData>(
|
||||
GetMyPagesBreadcrumbs,
|
||||
variables,
|
||||
tags
|
||||
)
|
||||
|
||||
if (!response.data.all_account_page.items[0].web?.breadcrumbs?.title) {
|
||||
return []
|
||||
}
|
||||
|
||||
const validatedBreadcrumbsData =
|
||||
validateMyPagesBreadcrumbsContentstackSchema.safeParse(response.data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user