ywana-core8 0.1.34 → 0.1.36

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