diff --git a/src/components/AddItemModal.vue b/src/components/AddItemModal.vue index ff65ddb..a415bad 100644 --- a/src/components/AddItemModal.vue +++ b/src/components/AddItemModal.vue @@ -28,8 +28,9 @@ export default { }, methods: { saveNewItem() { - this.$store.dispatch('postItem', this.item); - this.$emit('close'); + this.$store.dispatch('postItem', this.item).then(() => { + this.$emit('close'); + }); } } };