Merge pull request #510 from liyasthomas/hotfix/validate-collections

Validate duplicate collections
This commit is contained in:
James George
2020-01-21 20:10:15 +05:30
committed by GitHub

View File

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