diff --git a/examples/counter/package.json b/examples/counter/package.json index 4aa7a3d1..86e10a82 100644 --- a/examples/counter/package.json +++ b/examples/counter/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "dependencies": { - "@ice/store": "^1.3.3", + "@ice/store": "^1.3.4", "react": "^16.8.6", "react-dom": "^16.8.6" }, @@ -31,4 +31,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/examples/todos/package.json b/examples/todos/package.json index 0c6002a0..8e1c5fd9 100644 --- a/examples/todos/package.json +++ b/examples/todos/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "dependencies": { - "@ice/store": "^1.3.3", + "@ice/store": "^1.3.4", "lodash": "^4.17.15", "react": "^16.8.6", "react-dom": "^16.8.6" @@ -33,4 +33,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 2a7a24eb..f6c4f381 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ice/store", - "version": "1.3.3", + "version": "1.3.4", "description": "Simple and friendly state for React", "main": "lib/index.js", "files": [ @@ -64,4 +64,4 @@ "redux": "^4.0.5", "redux-thunk": "^2.3.0" } -} +} \ No newline at end of file diff --git a/src/plugins/modelApis.tsx b/src/plugins/modelApis.tsx index 0215678e..c5216b2c 100644 --- a/src/plugins/modelApis.tsx +++ b/src/plugins/modelApis.tsx @@ -21,7 +21,7 @@ export default (): T.Plugin => { } function useModelState(name: string) { const selector = store.useSelector(state => state[name]); - if (selector) { + if (typeof selector !== "undefined") { return selector; } throw new Error(`Not found model by namespace: ${name}.`);