Skip to content

Commit

Permalink
fix(devtool): resolve the issue that redux devtool not work with Mode…
Browse files Browse the repository at this point in the history
…l api
  • Loading branch information
Yidong Li authored and ArrayZoneYour committed Apr 23, 2023
1 parent 5ae2df5 commit e9dfb94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "react-model",
"version": "4.3.0-alpha.1",
"version": "4.3.0",
"description": "The State management library for React",
"main": "./dist/react-model.js",
"module": "./dist/react-model.esm.js",
"umd:main": "./dist/react-model.umd.js",
"types": "./src/index",
"scripts": {
"build:prod": "microbundle --define process.env.NODE_ENV=production --sourcemap false --jsx React.createElement --output dist --tsconfig ./tsconfig.json",
"build:dev": "microbundle --define process.env.NODE_ENV=development --sourcemap true --jsx React.createElement --output dist --tsconfig ./tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const devToolsListener: Middleware = async (context, restMiddlewares) => {
: `${context.modelName}_${context.actionName}`
Global.devTools.send(
actionName,
Global.mutableState[context.modelName],
context.type === 'u' ? Global.mutableState[context.modelName] : Global.State[context.modelName],
undefined,
context.modelName
)
Expand Down

0 comments on commit e9dfb94

Please sign in to comment.