Skip to content

Commit

Permalink
try to fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLindhout committed Feb 16, 2022
1 parent 4b9eccb commit 71f3f6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ function newRidgeState(initialValue, options) {
const pv = v;
v = newValue instanceof Function ? newValue(v) : newValue;
setTimeout(() => {
var _a;
sb.forEach((c) => c(v, pv));
callback?.(v, pv);
options?.onSet?.(v, pv);
callback === null || callback === void 0 ? void 0 : callback(v, pv);
(_a = options === null || options === void 0 ? void 0 : options.onSet) === null || _a === void 0 ? void 0 : _a.call(options, v, pv);
});
}
function subscribe(subscriber) {
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.2.7",
"version": "4.2.8",
"description": "react-ridge-state is a very simple global state management library for React and React Native",
"type": "module",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "esnext",
"target": "es6",
"declaration": true,
"outDir": "./dist",
"removeComments": true,
Expand Down

0 comments on commit 71f3f6a

Please sign in to comment.