@billgangcom/theme-lib 1.101.5 → 1.101.6

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.
@@ -12157,7 +12157,10 @@ const {
12157
12157
  headers: b == null ? void 0 : b.headers
12158
12158
  };
12159
12159
  } catch (b) {
12160
- const g = b, E = ((m = g.response) == null ? void 0 : m.data).errors[0], y = (p = g.response) == null ? void 0 : p.status;
12160
+ const g = b, C = (m = g.response) == null ? void 0 : m.data;
12161
+ let E = "Something Went Wrong";
12162
+ C && (E = C.errors[0]);
12163
+ const y = (p = g.response) == null ? void 0 : p.status;
12161
12164
  if (y === 401 && t.includes(v0.customersApi)) {
12162
12165
  const { logoutCustomer: I } = await Promise.resolve().then(() => B5e);
12163
12166
  await I();
@@ -17136,9 +17139,12 @@ const T3e = (e) => {
17136
17139
  withToken: !1
17137
17140
  });
17138
17141
  }, ha = async (e) => {
17139
- const t = Ht.getState().apiUrls, n = Kt ? localStorage.getItem("fakeDomain") : window.location.hostname, r = `${t.customersApi}/v2/${n}/customers/${e}`;
17142
+ const t = Ht.getState().apiUrls;
17143
+ if (!localStorage.getItem("token"))
17144
+ throw new Error("No access token");
17145
+ const r = Kt ? localStorage.getItem("fakeDomain") : window.location.hostname, i = `${t.customersApi}/v2/${r}/customers/${e}`;
17140
17146
  return await ht({
17141
- url: r,
17147
+ url: i,
17142
17148
  withToken: !0,
17143
17149
  method: "get",
17144
17150
  typeToken: "customer"