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