@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.umd.js CHANGED
@@ -1784,6 +1784,13 @@
1784
1784
  else if ("onabort" in this.context.#defaultDetails) {
1785
1785
  this.context.#defaultDetails.onabort.apply(this, argumentsList);
1786
1786
  }
1787
+ if (this.context.HttpxResponseHook.errorResponseCallBack({
1788
+ type: "onabort",
1789
+ error: new TypeError("request canceled"),
1790
+ response: null,
1791
+ }) == null) {
1792
+ return;
1793
+ }
1787
1794
  resolve({
1788
1795
  status: false,
1789
1796
  data: [...argumentsList],
@@ -2209,7 +2216,7 @@
2209
2216
  */
2210
2217
  use(successFn, errorFn) {
2211
2218
  if (typeof successFn !== "function" && typeof errorFn !== "function") {
2212
- console.warn("[Httpx-interceptors-response] 请传入拦截器函数");
2219
+ console.warn("[Httpx-interceptors-response] 必须传入一个拦截器函数");
2213
2220
  return;
2214
2221
  }
2215
2222
  return this.context.HttpxResponseHook.add(successFn, errorFn);