File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ export const pageTypesToSeo = (
131131 return null ;
132132 }
133133
134+ const regexBadDomain = / c a s a e v i d e o n e w i o \. m y v t e x \. c o m \/ | l e b i s c u i t \. m y v t e x \. c o m \/ | .+ \. v t e x c o m m e r c e s t a b l e \. c o m \. b r \/ / ;
135+
134136 return {
135137 title : current . title || current . name || "" ,
136138 description : current . metaTagDescription ! ,
@@ -139,7 +141,7 @@ export const pageTypesToSeo = (
139141 new URL (
140142 ( current . url && current . pageType !== "Collection" &&
141143 current . pageType !== "Brand" )
142- ? current . url . replace ( / . + \. v t e x c o m m e r c e s t a b l e \. c o m \. b r / , "" )
144+ ? current . url . replace ( regexBadDomain , "" )
143145 . toLowerCase ( )
144146 : url ,
145147 url ,
@@ -154,8 +156,7 @@ function toCanonical(url: URL, page?: number) {
154156 if ( typeof page === "number" ) {
155157 url . searchParams . set ( "page" , `${ page } ` ) ;
156158 }
157- const regex = / c a s a e v i d e o n e w i o \. m y v t e x \. c o m \/ | l e b i s c u i t \. m y v t e x \. c o m \/ / ;
158- return url . href . replace ( regex , "" ) ;
159+ return url . href
159160}
160161
161162/**
You can’t perform that action at this time.
0 commit comments