Removes item from collection breadcrumb to avoid clicking on link that doesn't redirects to any route.
This commit is contained in:
parent
a9e3e73167
commit
2868eff56a
|
@ -205,7 +205,7 @@ export default {
|
|||
switch(this.arrayRealPath[i-1]) {
|
||||
case 'collections':
|
||||
this.fetchCollectionNameAndURL(this.arrayRealPath[i])
|
||||
.then(collection => this.arrayViewPath.splice(i, 1, collection.name))
|
||||
.then(collection => { this.arrayViewPath.splice(i, 1, collection.name); })
|
||||
.catch((error) => this.$console.error(error));
|
||||
|
||||
break;
|
||||
|
@ -240,6 +240,11 @@ export default {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
let itemsIndex = this.arrayViewPath.findIndex(viewItem => viewItem == this.$i18n.get('items'));
|
||||
if (itemsIndex >= 0 && itemsIndex == this.arrayRealPath.length - 1) {
|
||||
this.arrayViewPath.splice(itemsIndex, 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -316,7 +316,6 @@ export default {
|
|||
'termId': this.termId,
|
||||
'taxonomy': this.taxonomy
|
||||
}).then((resp) => {
|
||||
|
||||
// The actual fetch item request
|
||||
resp.request.then((res) => {
|
||||
this.$emit( 'isLoadingItems', false);
|
||||
|
|
Loading…
Reference in New Issue