fix: prefer destructuring approach
This commit is contained in:
parent
a34acfd0c5
commit
fcdf93c5e5
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue