ywana-core8 0.1.33 → 0.1.34

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.
@@ -2568,8 +2568,10 @@ function _catch$7(body, recover) {
2568
2568
  var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
2569
2569
  var execute = function execute() {
2570
2570
  try {
2571
- var _temp = _catch$7(function () {
2572
- return Promise.resolve(onOK(user.email)).then(function () {
2571
+ return Promise.resolve(_catch$7(function () {
2572
+ var email = user.email;
2573
+ if (!email) throw new Error("Email not found");
2574
+ return Promise.resolve(onOK(email)).then(function () {
2573
2575
  if (onSuccess) onSuccess();
2574
2576
  site.notify({
2575
2577
  title: /*#__PURE__*/React.createElement(Text$1, null, "Forgot Password"),
@@ -2584,8 +2586,7 @@ var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
2584
2586
  type: "danger",
2585
2587
  icon: "error"
2586
2588
  });
2587
- });
2588
- return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
2589
+ }));
2589
2590
  } catch (e) {
2590
2591
  return Promise.reject(e);
2591
2592
  }
@@ -2617,7 +2618,7 @@ var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
2617
2618
  var UnlockUserAction = function UnlockUserAction(props) {
2618
2619
  var execute = function execute() {
2619
2620
  try {
2620
- var _temp2 = _catch$7(function () {
2621
+ var _temp = _catch$7(function () {
2621
2622
  return Promise.resolve(onOK(user)).then(function () {
2622
2623
  if (onSuccess) onSuccess();
2623
2624
  site.notify({
@@ -2634,7 +2635,7 @@ var UnlockUserAction = function UnlockUserAction(props) {
2634
2635
  icon: "error"
2635
2636
  });
2636
2637
  });
2637
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
2638
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
2638
2639
  } catch (e) {
2639
2640
  return Promise.reject(e);
2640
2641
  }
@@ -2684,7 +2685,7 @@ var ChangeUserPasswordAction = function ChangeUserPasswordAction(props) {
2684
2685
  function execute() {
2685
2686
  var onOK = function onOK(form) {
2686
2687
  try {
2687
- var _temp3 = _catch$7(function () {
2688
+ var _temp2 = _catch$7(function () {
2688
2689
  return Promise.resolve(props.onOK(user, form.oldPassword, form.password1)).then(function () {
2689
2690
  site.notify({
2690
2691
  title: /*#__PURE__*/React.createElement(Text$1, null, "Change Password"),
@@ -2709,7 +2710,7 @@ var ChangeUserPasswordAction = function ChangeUserPasswordAction(props) {
2709
2710
  error: message
2710
2711
  }));
2711
2712
  });
2712
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
2713
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
2713
2714
  } catch (e) {
2714
2715
  return Promise.reject(e);
2715
2716
  }