@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.
@@ -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);