fix: validation for duplicate collections

This commit is contained in:
jamesgeorge007
2020-01-21 16:37:04 +05:30
parent cd2680135d
commit 2853a4bbef

View File

@@ -111,6 +111,10 @@ export const mutations = {
},
addNewCollection({ collections }, collection) {
const duplicateCollection = collections.some(item => item.name === collection.name)
if (duplicateCollection) {
alert('Duplicate collection');
}
collections.push({
name: "",
folders: [],