@whitesev/utils 1.4.9 → 1.5.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/dist/index.amd.js CHANGED
@@ -1780,6 +1780,13 @@ define((function () { 'use strict';
1780
1780
  else if ("onabort" in this.context.#defaultDetails) {
1781
1781
  this.context.#defaultDetails.onabort.apply(this, argumentsList);
1782
1782
  }
1783
+ if (this.context.HttpxResponseHook.errorResponseCallBack({
1784
+ type: "onabort",
1785
+ error: new TypeError("request canceled"),
1786
+ response: null,
1787
+ }) == null) {
1788
+ return;
1789
+ }
1783
1790
  resolve({
1784
1791
  status: false,
1785
1792
  data: [...argumentsList],
@@ -2205,7 +2212,7 @@ define((function () { 'use strict';
2205
2212
  */
2206
2213
  use(successFn, errorFn) {
2207
2214
  if (typeof successFn !== "function" && typeof errorFn !== "function") {
2208
- console.warn("[Httpx-interceptors-response] 请传入拦截器函数");
2215
+ console.warn("[Httpx-interceptors-response] 必须传入一个拦截器函数");
2209
2216
  return;
2210
2217
  }
2211
2218
  return this.context.HttpxResponseHook.add(successFn, errorFn);