@expressive/mvc 0.19.0 → 0.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +7 -10
- package/lib/index.js +7 -10
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -140,20 +140,17 @@ function createEffect(model, callback, keys) {
|
|
|
140
140
|
return control(model, controller => {
|
|
141
141
|
let unSet;
|
|
142
142
|
let busy = false;
|
|
143
|
-
function effect(value) {
|
|
144
|
-
if (typeof unSet == "function")
|
|
145
|
-
unSet();
|
|
146
|
-
unSet = callback.call(this, value);
|
|
147
|
-
if (unSet instanceof Promise)
|
|
148
|
-
unSet = undefined;
|
|
149
|
-
if (unSet && typeof unSet !== "function")
|
|
150
|
-
throw Oops$7.BadCallback();
|
|
151
|
-
}
|
|
152
143
|
function invoke() {
|
|
153
144
|
if (busy)
|
|
154
145
|
return;
|
|
155
146
|
const output = mayRetry(() => {
|
|
156
|
-
|
|
147
|
+
if (typeof unSet == "function")
|
|
148
|
+
unSet();
|
|
149
|
+
unSet = callback.call(model, model);
|
|
150
|
+
if (unSet instanceof Promise)
|
|
151
|
+
unSet = undefined;
|
|
152
|
+
if (unSet && typeof unSet !== "function")
|
|
153
|
+
throw Oops$7.BadCallback();
|
|
157
154
|
});
|
|
158
155
|
if (output instanceof Promise) {
|
|
159
156
|
output.finally(() => busy = false);
|
package/lib/index.js
CHANGED
|
@@ -144,20 +144,17 @@ function createEffect(model, callback, keys) {
|
|
|
144
144
|
return control(model, controller => {
|
|
145
145
|
let unSet;
|
|
146
146
|
let busy = false;
|
|
147
|
-
function effect(value) {
|
|
148
|
-
if (typeof unSet == "function")
|
|
149
|
-
unSet();
|
|
150
|
-
unSet = callback.call(this, value);
|
|
151
|
-
if (unSet instanceof Promise)
|
|
152
|
-
unSet = undefined;
|
|
153
|
-
if (unSet && typeof unSet !== "function")
|
|
154
|
-
throw Oops$7.BadCallback();
|
|
155
|
-
}
|
|
156
147
|
function invoke() {
|
|
157
148
|
if (busy)
|
|
158
149
|
return;
|
|
159
150
|
const output = mayRetry(() => {
|
|
160
|
-
|
|
151
|
+
if (typeof unSet == "function")
|
|
152
|
+
unSet();
|
|
153
|
+
unSet = callback.call(model, model);
|
|
154
|
+
if (unSet instanceof Promise)
|
|
155
|
+
unSet = undefined;
|
|
156
|
+
if (unSet && typeof unSet !== "function")
|
|
157
|
+
throw Oops$7.BadCallback();
|
|
161
158
|
});
|
|
162
159
|
if (output instanceof Promise) {
|
|
163
160
|
output.finally(() => busy = false);
|
package/package.json
CHANGED