Skip to content

Commit

Permalink
fix: 🐛 update props field when change (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
foreleven authored Feb 11, 2020
1 parent 4d00d52 commit d52d7f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stated-bean",
"version": "0.8.5",
"version": "0.8.6",
"description": "A light but scalable state management library with react hooks",
"repository": "[email protected]:mjolnirjs/stated-bean.git",
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions src/core/BeanObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ export class BeanObserver<T = unknown> {

if (setter && typeof setter === 'function') {
setter.apply(bean, [newValue]);
} else {
Reflect.set((bean as unknown) as object, field.name, newValue);
}
}
}
Expand Down

0 comments on commit d52d7f6

Please sign in to comment.