From d3061773ff34a3cd102f73dfff3f633c80f40482 Mon Sep 17 00:00:00 2001 From: Kouts Date: Mon, 17 May 2021 14:12:49 +0300 Subject: [PATCH] feat: return array method result BREAKING CHANGE: array methods now return a value --- src/pathStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pathStore.js b/src/pathStore.js index f2b203b..35105ad 100644 --- a/src/pathStore.js +++ b/src/pathStore.js @@ -26,7 +26,7 @@ const createPathStore = (state) => { if (!isArray(arr)) { throw Error('Argument must be an array.') } - arr[method](...args) + return arr[method](...args) } return Object.assign(acc, { [method]: fn }) }, {})