Small verification step before passing duplicated item id.

This commit is contained in:
Mateus Machado Luna 2019-07-18 14:54:13 -03:00
parent 72388ecd14
commit 5a8007a174
1 changed files with 3 additions and 1 deletions

View File

@ -83,7 +83,9 @@
.then((duplicatedItem) => {
this.isLoading = false;
this.message = this.$i18n.get('label_item_duplication_success');
this.duplicatedItemId = duplicatedItem.id;
if (duplicatedItem.id)
this.duplicatedItemId = duplicatedItem.id;
})
.catch((error) => {
this.$console.error('Error fetching item for duplicate ' + error);