fix: prefer destructuring approach

This commit is contained in:
jamesgeorge007
2020-01-21 16:38:34 +05:30
parent a34acfd0c5
commit fcdf93c5e5

View File

@@ -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;