🐛 Hotfix: Broken toast and edit/save operations
This commit is contained in:
@@ -67,7 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
addNewCollection() {
|
addNewCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info($t("invalid_collection_name"))
|
this.$toast.info(this.$t("invalid_collection_name"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.$store.commit("postwoman/addNewCollection", {
|
this.$store.commit("postwoman/addNewCollection", {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
saveCollection() {
|
saveCollection() {
|
||||||
if (!this.$data.name) {
|
if (!this.$data.name) {
|
||||||
this.$toast.info($t("invalid_collection_name"))
|
this.$toast.info(this.$t("invalid_collection_name"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const collectionUpdated = {
|
const collectionUpdated = {
|
||||||
|
|||||||
@@ -218,10 +218,8 @@ export const mutations = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
editCollection({ collections }, payload) {
|
editCollection({ collections }, payload) {
|
||||||
const {
|
const { collection, collectionIndex } = payload
|
||||||
collection: { name },
|
const { name } = collection
|
||||||
collectionIndex,
|
|
||||||
} = payload
|
|
||||||
const duplicateCollection = collections.some(
|
const duplicateCollection = collections.some(
|
||||||
item => item.name.toLowerCase() === name.toLowerCase()
|
item => item.name.toLowerCase() === name.toLowerCase()
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user