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.
package/dist/index.cjs CHANGED
@@ -2577,8 +2577,10 @@ function _catch$7(body, recover) {
2577
2577
  var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
2578
2578
  var execute = function execute() {
2579
2579
  try {
2580
- var _temp = _catch$7(function () {
2581
- return Promise.resolve(onOK(user.email)).then(function () {
2580
+ return Promise.resolve(_catch$7(function () {
2581
+ var email = user.email;
2582
+ if (!email) throw new Error("Email not found");
2583
+ return Promise.resolve(onOK(email)).then(function () {
2582
2584
  if (onSuccess) onSuccess();
2583
2585
  site.notify({
2584
2586
  title: /*#__PURE__*/React__default["default"].createElement(Text$1, null, "Forgot Password"),
@@ -2593,8 +2595,7 @@ var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
2593
2595
  type: "danger",
2594
2596
  icon: "error"
2595
2597
  });
2596
- });
2597
- return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
2598
+ }));
2598
2599
  } catch (e) {
2599
2600
  return Promise.reject(e);
2600
2601
  }
@@ -2626,7 +2627,7 @@ var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
2626
2627
  var UnlockUserAction = function UnlockUserAction(props) {
2627
2628
  var execute = function execute() {
2628
2629
  try {
2629
- var _temp2 = _catch$7(function () {
2630
+ var _temp = _catch$7(function () {
2630
2631
  return Promise.resolve(onOK(user)).then(function () {
2631
2632
  if (onSuccess) onSuccess();
2632
2633
  site.notify({
@@ -2643,7 +2644,7 @@ var UnlockUserAction = function UnlockUserAction(props) {
2643
2644
  icon: "error"
2644
2645
  });
2645
2646
  });
2646
- return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
2647
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
2647
2648
  } catch (e) {
2648
2649
  return Promise.reject(e);
2649
2650
  }
@@ -2693,7 +2694,7 @@ var ChangeUserPasswordAction = function ChangeUserPasswordAction(props) {
2693
2694
  function execute() {
2694
2695
  var onOK = function onOK(form) {
2695
2696
  try {
2696
- var _temp3 = _catch$7(function () {
2697
+ var _temp2 = _catch$7(function () {
2697
2698
  return Promise.resolve(props.onOK(user, form.oldPassword, form.password1)).then(function () {
2698
2699
  site.notify({
2699
2700
  title: /*#__PURE__*/React__default["default"].createElement(Text$1, null, "Change Password"),
@@ -2718,7 +2719,7 @@ var ChangeUserPasswordAction = function ChangeUserPasswordAction(props) {
2718
2719
  error: message
2719
2720
  }));
2720
2721
  });
2721
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
2722
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
2722
2723
  } catch (e) {
2723
2724
  return Promise.reject(e);
2724
2725
  }