Skip to content

Commit

Permalink
Bugfix for callback setState
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLindhout committed Jun 22, 2020
1 parent c9f088b commit 77c4766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function newRidgeState(iv, o) {
let sb = [];
let v = iv;
let set = (ns, ac, ca) => {
v = (v instanceof Function ? ns(v) : ns);
v = (ns instanceof Function ? ns(v) : ns);
ca && ca(v);
setTimeout(() => {
sb.forEach((c) => c !== ca && c(v));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-ridge-state",
"version": "4.0.0",
"version": "4.0.1",
"description": "react-ridge-state is a very simple global state management library for React and React Native",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 77c4766

Please sign in to comment.