@applica-software-guru/react-admin 1.4.0-beta.6 → 1.4.0-beta.7

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.
@@ -20472,6 +20472,10 @@ function mU(e) {
20472
20472
  }
20473
20473
  });
20474
20474
  }, [r.palette.mode]), Pe(() => {
20475
+ if (!t.isImpersonating) {
20476
+ console.warn("authProvider does not contain a method called isImpersonating", t);
20477
+ return;
20478
+ }
20475
20479
  t == null || t.isImpersonating().then((X) => {
20476
20480
  var z;
20477
20481
  v(!X && ((z = n == null ? void 0 : n.data) == null ? void 0 : z.needToChangePassword) === !0);
@@ -20733,11 +20737,15 @@ const SU = () => {
20733
20737
  ] }) });
20734
20738
  }, RU = () => {
20735
20739
  const e = Xt(), t = Ui(), n = Se(
20736
- () => t == null ? void 0 : t.stopImpersonate().then(() => document.location.href = "/"),
20740
+ () => t.stopImpersonate().then(() => document.location.href = "/"),
20737
20741
  [t == null ? void 0 : t.stopImpersonating]
20738
20742
  ), [r, o] = je(!1);
20739
20743
  return Pe(() => {
20740
- t.isImpersonating && (t == null || t.isImpersonating().then((a) => o(a)));
20744
+ if (!t.isImpersonating) {
20745
+ console.warn("The authProvider does not support the isImpersonating feature", t);
20746
+ return;
20747
+ }
20748
+ t.isImpersonating().then((a) => o(a));
20741
20749
  }, [t, o]), r ? /* @__PURE__ */ h(vo, { children: /* @__PURE__ */ $(Dr, { onClick: n, children: [
20742
20750
  /* @__PURE__ */ h(Pr, { children: /* @__PURE__ */ h(nv, {}) }),
20743
20751
  /* @__PURE__ */ h(Gn, { primary: e("ra.auth.stop_impersonate") })