refactor: nested destructuring

This commit is contained in:
jamesgeorge007
2020-02-20 09:45:19 +05:30
parent 09a35cf10a
commit d2b73a8942

View File

@@ -139,8 +139,8 @@ export const mutations = {
},
editCollection({ collections }, payload) {
const { collection, collectionIndex } = payload;
const { name } = collection;
const { collection: { name }, collectionIndex } = payload;
// const { name } = collection;
const duplicateCollection = collections.some(
item => item.name.toLowerCase() === name.toLowerCase()
);