@whitesev/utils 1.4.9 → 1.5.0
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/dist/index.amd.js +8 -1
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +8 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +8 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +8 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +8 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +8 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/src/Httpx.d.ts +2 -2
- package/package.json +1 -1
- package/src/Httpx.ts +18 -9
package/dist/index.system.js
CHANGED
|
@@ -1783,6 +1783,13 @@ System.register('Utils', [], (function (exports) {
|
|
|
1783
1783
|
else if ("onabort" in this.context.#defaultDetails) {
|
|
1784
1784
|
this.context.#defaultDetails.onabort.apply(this, argumentsList);
|
|
1785
1785
|
}
|
|
1786
|
+
if (this.context.HttpxResponseHook.errorResponseCallBack({
|
|
1787
|
+
type: "onabort",
|
|
1788
|
+
error: new TypeError("request canceled"),
|
|
1789
|
+
response: null,
|
|
1790
|
+
}) == null) {
|
|
1791
|
+
return;
|
|
1792
|
+
}
|
|
1786
1793
|
resolve({
|
|
1787
1794
|
status: false,
|
|
1788
1795
|
data: [...argumentsList],
|
|
@@ -2208,7 +2215,7 @@ System.register('Utils', [], (function (exports) {
|
|
|
2208
2215
|
*/
|
|
2209
2216
|
use(successFn, errorFn) {
|
|
2210
2217
|
if (typeof successFn !== "function" && typeof errorFn !== "function") {
|
|
2211
|
-
console.warn("[Httpx-interceptors-response]
|
|
2218
|
+
console.warn("[Httpx-interceptors-response] 必须传入一个拦截器函数");
|
|
2212
2219
|
return;
|
|
2213
2220
|
}
|
|
2214
2221
|
return this.context.HttpxResponseHook.add(successFn, errorFn);
|