Fixes View Collection button not always getting proper url.
This commit is contained in:
parent
06df10b8c1
commit
fb63dc9c27
|
@ -141,7 +141,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
...mapActions('collection', [
|
||||
'fetchCollectionName'
|
||||
'fetchCollectionNameAndURL'
|
||||
]),
|
||||
...mapGetters('collection', [
|
||||
'getCollectionName',
|
||||
|
@ -172,8 +172,8 @@ export default {
|
|||
|
||||
switch(this.arrayRealPath[i-1]) {
|
||||
case 'collections':
|
||||
this.fetchCollectionName(this.arrayRealPath[i])
|
||||
.then(collectionName => this.arrayViewPath.splice(i, 1, collectionName))
|
||||
this.fetchCollectionNameAndURL(this.arrayRealPath[i])
|
||||
.then(collection => this.arrayViewPath.splice(i, 1, collection.name))
|
||||
.catch((error) => this.$console.error(error));
|
||||
|
||||
break;
|
||||
|
|
|
@ -46,7 +46,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
...mapActions('collection', [
|
||||
'fetchCollectionName'
|
||||
'fetchCollectionNameAndURL'
|
||||
]),
|
||||
...mapGetters('collection', [
|
||||
'getCollectionName'
|
||||
|
@ -79,8 +79,8 @@ export default {
|
|||
|
||||
switch(this.arrayRealPath[i-1]) {
|
||||
case 'collections':
|
||||
this.fetchCollectionName(this.arrayRealPath[i])
|
||||
.then(collectionName => { this.arrayViewPath.splice(i, 1, collectionName); this.entityName = collectionName; })
|
||||
this.fetchCollectionNameAndURL(this.arrayRealPath[i])
|
||||
.then(collection => { this.arrayViewPath.splice(i, 1, collection.name); this.entityName = collection.name; })
|
||||
.catch((error) => this.$console.error(error));
|
||||
break;
|
||||
case 'items':
|
||||
|
|
Loading…
Reference in New Issue