Catch to disable loading when items page loading creates an error.

This commit is contained in:
mateuswetah 2022-03-22 10:18:36 -03:00
parent 8d6e712879
commit 4da0e28455
1 changed files with 5 additions and 3 deletions

View File

@ -495,18 +495,20 @@
contextEdit: true,
fetchOnly: 'title,thumbnail,status,modification_date,document_type,document_mimetype,document,comment_status,document_as_html,related_items'
})
.then((resp) => {
.then((resp) => {
resp.request.then((item) => {
this.$root.$emit('onCollectionBreadCrumbUpdate', [
{path: this.$routerHelper.getCollectionPath(this.collectionId), label: this.$i18n.get('items')},
{path: '', label: item.title}
]);
this.loadMetadata();
});
})
.catch(() => this.isLoading = false);
// Item resquest token for cancelling
this.itemRequestCancel = resp.source;
});
})
.catch(() => this.isLoading = false);
},
methods: {