From f42e0329da7112920126401abdd89ccb57ab8af3 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Mon, 23 Sep 2019 23:42:07 +0530 Subject: [PATCH] use array destructuring approach --- store/postwoman.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/store/postwoman.js b/store/postwoman.js index dcd07b9e1..83ee2714b 100644 --- a/store/postwoman.js +++ b/store/postwoman.js @@ -51,8 +51,7 @@ export const mutations = { if(setting == null || !(setting instanceof Array) || setting.length !== 2) throw new Error("You must provide a setting (array in the form [key, value])"); - let key = setting[0]; - let value = setting[1]; + const [key, value] = setting; // Do not just remove this check. // Add your settings key to the SETTINGS_KEYS array at the // top of the file.