diff --git a/src/store.js b/src/store.js index 5dd65a0b9..c4cb3f1a5 100644 --- a/src/store.js +++ b/src/store.js @@ -489,9 +489,7 @@ function enableStrictMode (store) { } function getNestedState (state, path) { - return path.length - ? path.reduce((state, key) => state[key], state) - : state + return path.reduce((state, key) => state[key], state) } function unifyObjectStyle (type, payload, options) {