fix: prefer destructuring approach
This commit is contained in:
@@ -111,7 +111,8 @@ export const mutations = {
|
||||
},
|
||||
|
||||
addNewCollection({ collections }, collection) {
|
||||
const duplicateCollection = collections.some(item => item.name === collection.name)
|
||||
const { name } = collection
|
||||
const duplicateCollection = collections.some(item => item.name === name)
|
||||
if (duplicateCollection) {
|
||||
alert('Duplicate collection');
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user