From fcdf93c5e55683f8f02edd450c7e76a2fa9c88ec Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 21 Jan 2020 16:38:34 +0530 Subject: [PATCH] fix: prefer destructuring approach --- store/postwoman.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/store/postwoman.js b/store/postwoman.js index dabaf781b..df7399d31 100644 --- a/store/postwoman.js +++ b/store/postwoman.js @@ -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;