@memberstack/dom 1.0.0-beta.15 → 1.0.0-beta.16
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/utils/proxy.js +14 -10
- package/package.json +1 -1
package/lib/utils/proxy.js
CHANGED
|
@@ -63,16 +63,20 @@ var handleResponse = function (fn, props) {
|
|
|
63
63
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
64
64
|
args[_i] = arguments[_i];
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
var result = fn.apply(void 0, __spread(args));
|
|
67
|
+
if (result === null || result === void 0 ? void 0 : result.then) {
|
|
68
|
+
return result.then(function (res) {
|
|
69
|
+
var _a, _b, _c, _d;
|
|
70
|
+
if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.member) {
|
|
71
|
+
persistence_1.setPersistedMember((_b = res.data) === null || _b === void 0 ? void 0 : _b.member, props.persistence);
|
|
72
|
+
}
|
|
73
|
+
if ((_d = (_c = res === null || res === void 0 ? void 0 : res.data) === null || _c === void 0 ? void 0 : _c.id) === null || _d === void 0 ? void 0 : _d.startsWith("mem_")) {
|
|
74
|
+
persistence_1.setPersistedMember(res.data, props.persistence);
|
|
75
|
+
}
|
|
76
|
+
return res;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
76
80
|
};
|
|
77
81
|
};
|
|
78
82
|
var handler = function (props) { return ({
|