@civet/core 1.4.0 → 1.4.1
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/DataProvider.js +3 -2
- package/package.json +1 -1
- package/src/DataProvider.js +11 -7
package/lib/DataProvider.js
CHANGED
|
@@ -105,9 +105,10 @@ var DataProvider = /*#__PURE__*/function () {
|
|
|
105
105
|
}
|
|
106
106
|
if (error != null) callback(error, true, []);else if (result == null) callback(undefined, done, []);else if (Array.isArray(result)) callback(undefined, done, result);else callback(undefined, done, [result]);
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
var proxy = signal.proxy();
|
|
109
|
+
resolve(Promise.resolve(_this2.handleGet(resource, query, options, getMeta(meta), proxy)).then(function (result) {
|
|
109
110
|
if (typeof result === 'function') {
|
|
110
|
-
result(cb,
|
|
111
|
+
result(cb, proxy);
|
|
111
112
|
} else {
|
|
112
113
|
cb(undefined, true, result);
|
|
113
114
|
}
|
package/package.json
CHANGED
package/src/DataProvider.js
CHANGED
|
@@ -94,14 +94,18 @@ class DataProvider {
|
|
|
94
94
|
else callback(undefined, done, [result]);
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
+
const proxy = signal.proxy();
|
|
98
|
+
|
|
97
99
|
resolve(
|
|
98
|
-
Promise.resolve(this.handleGet(resource, query, options, getMeta(meta))).then(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
Promise.resolve(this.handleGet(resource, query, options, getMeta(meta), proxy)).then(
|
|
101
|
+
(result) => {
|
|
102
|
+
if (typeof result === 'function') {
|
|
103
|
+
result(cb, proxy);
|
|
104
|
+
} else {
|
|
105
|
+
cb(undefined, true, result);
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
),
|
|
105
109
|
);
|
|
106
110
|
}).catch((e) => {
|
|
107
111
|
if (!signal.locked) callback(e, true, []);
|