Skip to content

Commit

Permalink
Use name as title SEO fallback (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusgr authored Jul 24, 2024
1 parent 90a932a commit c00d746
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vtex/loaders/legacy/productDetailsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async function loader(
? await withIsSimilarTo(req, ctx, page.product)
: page.product,
seo: {
title: product.productTitle,
title: product.productTitle || product.productName,
description: product.metaTagDescription,
canonical: new URL(`/${product.linkText}/p`, url.origin).href,
noIndexing: props.indexingSkus ? false : !!skuId,
Expand Down
2 changes: 1 addition & 1 deletion vtex/utils/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const pageTypesToSeo = (
}

return {
title: current.title!,
title: current.title || current.name || "",
description: current.metaTagDescription!,
noIndexing: hasMapTermOrSkuId,
canonical: toCanonical(
Expand Down

0 comments on commit c00d746

Please sign in to comment.