🐛 Fixed a bug with Collection sync
This commit is contained in:
@@ -111,10 +111,10 @@ export const mutations = {
|
||||
},
|
||||
|
||||
addNewCollection({ collections }, collection) {
|
||||
const { name } = collection
|
||||
const duplicateCollection = collections.some(item => item.name === name)
|
||||
const { name } = collection;
|
||||
const duplicateCollection = collections.some(item => item.name === name);
|
||||
if (duplicateCollection) {
|
||||
this.$toast.info('Duplicate collection');
|
||||
this.$toast.info("Duplicate collection");
|
||||
return;
|
||||
}
|
||||
collections.push({
|
||||
@@ -132,10 +132,10 @@ export const mutations = {
|
||||
|
||||
editCollection({ collections }, payload) {
|
||||
const { collection, collectionIndex } = payload;
|
||||
const { name } = collection
|
||||
const duplicateCollection = collections.some(item => item.name === name)
|
||||
const { name } = collection;
|
||||
const duplicateCollection = collections.some(item => item.name === name);
|
||||
if (duplicateCollection) {
|
||||
this.$toast.info('Duplicate collection');
|
||||
this.$toast.info("Duplicate collection");
|
||||
return;
|
||||
}
|
||||
collections[collectionIndex] = collection;
|
||||
|
||||
Reference in New Issue
Block a user