fix: validation for duplicate collections
This commit is contained in:
parent
cd2680135d
commit
2853a4bbef
1 changed files with 4 additions and 0 deletions
|
|
@ -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: [],
|
||||
|
|
|
|||
Loading…
Reference in a new issue