diff --git a/resources/assets/js/components/CollectionCompose.vue b/resources/assets/js/components/CollectionCompose.vue index 462adf6e9..9ae7de01e 100644 --- a/resources/assets/js/components/CollectionCompose.vue +++ b/resources/assets/js/components/CollectionCompose.vue @@ -30,7 +30,8 @@

- + +

@@ -221,6 +222,10 @@ export default { }, publish() { + if(this.posts.length == 0) { + swal('Error', 'You cannot publish an empty collection'); + return; + } axios.post('/api/local/collection/' + this.collectionId + '/publish', { title: this.collection.title, description: this.collection.description, @@ -228,6 +233,8 @@ export default { }) .then(res => { window.location.href = res.data; + }).catch(err => { + swal('Something went wrong', 'There was a problem with your request, please try again later.', 'error'); }); },