Comparing version 2.3.0 to 2.3.1
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
## 2.3.1 - 2021-02-14 | ||
- Nicer error when accessing something in the store that doesn't exist | ||
## 2.3.0 - 2021-02-10 | ||
@@ -5,0 +8,0 @@ - Adds `<BindLogic logic={keyedLogic} props={{ id: 12 }}>`, which passes a specific build of |
@@ -893,3 +893,7 @@ 'use strict'; | ||
return [state].concat(path).reduce(function (v, a) { | ||
return v[a]; | ||
if (a in v) { | ||
return v[a]; | ||
} | ||
throw new Error("[KEA] Can not find path \"" + path.join('.') + "\" in the redux store."); | ||
}); | ||
@@ -896,0 +900,0 @@ } |
@@ -889,3 +889,7 @@ import { createSelector } from 'reselect'; | ||
return [state].concat(path).reduce(function (v, a) { | ||
return v[a]; | ||
if (a in v) { | ||
return v[a]; | ||
} | ||
throw new Error("[KEA] Can not find path \"" + path.join('.') + "\" in the redux store."); | ||
}); | ||
@@ -892,0 +896,0 @@ } |
{ | ||
"name": "kea", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Smart front-end architecture", | ||
@@ -5,0 +5,0 @@ "author": "Marius Andra", |
@@ -27,3 +27,8 @@ import { createSelector } from 'reselect' | ||
function pathSelector(path: PathType, state: any) { | ||
return [state].concat(path).reduce((v, a) => v[a]) | ||
return [state].concat(path).reduce((v, a) => { | ||
if (a in v) { | ||
return v[a] | ||
} | ||
throw new Error(`[KEA] Can not find path "${path.join('.')}" in the store.`) | ||
}) | ||
} |
279579
7016