From 41586a86fa4218f70e2dcc02327affe0382aeab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=96=87=E6=B6=9B?= Date: Wed, 8 Apr 2020 10:49:57 +0800 Subject: [PATCH] fix: getModelDispatchers (#92) * fix: getModelDispatchers * chore: example @ice/store version --- examples/counter/package.json | 2 +- examples/todos/package.json | 2 +- package.json | 2 +- src/plugins/modelApis.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/counter/package.json b/examples/counter/package.json index eaa3fe30..4aa7a3d1 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.0", + "@ice/store": "^1.3.3", "react": "^16.8.6", "react-dom": "^16.8.6" }, diff --git a/examples/todos/package.json b/examples/todos/package.json index 35cefa96..0c6002a0 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.0", + "@ice/store": "^1.3.3", "lodash": "^4.17.15", "react": "^16.8.6", "react-dom": "^16.8.6" diff --git a/package.json b/package.json index 47f30b6a..2a7a24eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ice/store", - "version": "1.3.2", + "version": "1.3.3", "description": "Simple and friendly state for React", "main": "lib/index.js", "files": [ diff --git a/src/plugins/modelApis.tsx b/src/plugins/modelApis.tsx index b7ba237c..0215678e 100644 --- a/src/plugins/modelApis.tsx +++ b/src/plugins/modelApis.tsx @@ -53,7 +53,7 @@ export default (): T.Plugin => { return store.getState()[name]; } function getModelDispatchers(name: string) { - return store.dispatch()[name]; + return store.dispatch[name]; } function withModel(name: string, mapModelToProps?) { mapModelToProps = (mapModelToProps || ((model) => ({ [name]: model })));