diff --git a/components/collections/addCollection.vue b/components/collections/addCollection.vue index 878c9d788..518db55d4 100644 --- a/components/collections/addCollection.vue +++ b/components/collections/addCollection.vue @@ -67,7 +67,7 @@ export default { }, addNewCollection() { if (!this.$data.name) { - this.$toast.info($t("invalid_collection_name")) + this.$toast.info(this.$t("invalid_collection_name")) return } this.$store.commit("postwoman/addNewCollection", { diff --git a/components/collections/editCollection.vue b/components/collections/editCollection.vue index 8cfd3f27c..7d7fb4248 100644 --- a/components/collections/editCollection.vue +++ b/components/collections/editCollection.vue @@ -60,7 +60,7 @@ export default { methods: { saveCollection() { if (!this.$data.name) { - this.$toast.info($t("invalid_collection_name")) + this.$toast.info(this.$t("invalid_collection_name")) return } const collectionUpdated = { diff --git a/store/postwoman.js b/store/postwoman.js index 8857ccaba..c9b58d43c 100644 --- a/store/postwoman.js +++ b/store/postwoman.js @@ -218,10 +218,8 @@ export const mutations = { }, editCollection({ collections }, payload) { - const { - collection: { name }, - collectionIndex, - } = payload + const { collection, collectionIndex } = payload + const { name } = collection const duplicateCollection = collections.some( item => item.name.toLowerCase() === name.toLowerCase() )