Skip to content

Commit

Permalink
Tavano/rollback split (#829)
Browse files Browse the repository at this point in the history
* Release [0.56.14]

* Release [0.56.15]

* rollback breadcrumb split

* Update deno.json
  • Loading branch information
guitavano authored Sep 2, 2024
1 parent 7003916 commit e41efdf
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions vtex/utils/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,17 +472,7 @@ const toBreadcrumbList = (
{ baseUrl }: ProductOptions,
): BreadcrumbList => {
const { categories, productName } = product;

const names = categories.map((category, idx) => {
const removeNext = category?.replace(categories[idx + 1], "");
const removeSlashStart = removeNext?.startsWith("/")
? removeNext?.slice(1)
: removeNext;
const removeSlashEnd = removeSlashStart?.endsWith("/")
? removeSlashStart?.slice(0, -1)
: removeSlashStart;
return removeSlashEnd;
}).toReversed();
const names = categories[0]?.split("/").filter(Boolean);

const segments = names.map(slugify);

Expand Down

0 comments on commit e41efdf

Please sign in to comment.