File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ function getBreadcrumbs(html, pathname) {
32
32
const urlPrefix = `${ root } ${ pathname . substring ( 6 ) } ` ;
33
33
let accumulatedUrl = '' ;
34
34
const breadcrumbs = [ ] ;
35
+ let lastMismatch ;
35
36
for ( let i = 0 ; i < breadcrumbsArray . length ; i += 1 ) {
36
37
const currentElement = breadcrumbsArray [ i ] ;
37
38
const breadcrumbsName = currentElement . name ;
@@ -56,9 +57,15 @@ function getBreadcrumbs(html, pathname) {
56
57
}
57
58
58
59
const currentElementUrl = new URL ( currentElement . item ) ;
59
- report . breadcrumbs_mismatch [ accBreadcrumbs ] = currentElementUrl . pathname . substring ( 6 ) ;
60
+ const currentMismatch = currentElementUrl . pathname . substring ( 6 ) ;
61
+
62
+ if ( lastMismatch !== currentMismatch ) {
63
+ report . breadcrumbs_mismatch [ accBreadcrumbs ] = currentMismatch ;
64
+ lastMismatch = currentMismatch ;
65
+ }
60
66
}
61
67
}
68
+
62
69
return breadcrumbs ;
63
70
}
64
71
You can’t perform that action at this time.
0 commit comments