@linzjs/lui 17.9.4 → 17.10.0

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/lui.esm.js CHANGED
@@ -29004,18 +29004,23 @@ var LOLLogoutLink = function (props) {
29004
29004
  return null;
29005
29005
  }
29006
29006
  var logout = function () { return __awaiter(void 0, void 0, void 0, function () {
29007
- var res;
29008
- return __generator(this, function (_a) {
29009
- switch (_a.label) {
29007
+ var _a, res;
29008
+ return __generator(this, function (_b) {
29009
+ switch (_b.label) {
29010
29010
  case 0:
29011
- if (!props.callBackBeforeLogout) return [3 /*break*/, 2];
29011
+ _a = props.callBackBeforeLogout;
29012
+ if (!_a) return [3 /*break*/, 2];
29012
29013
  return [4 /*yield*/, props.callBackBeforeLogout()];
29013
29014
  case 1:
29014
- _a.sent();
29015
- _a.label = 2;
29016
- case 2: return [4 /*yield*/, fetch('/auth/api/logout')];
29015
+ _a = (_b.sent()) === false;
29016
+ _b.label = 2;
29017
+ case 2:
29018
+ if (_a) {
29019
+ return [2 /*return*/];
29020
+ }
29021
+ return [4 /*yield*/, fetch('/auth/api/logout')];
29017
29022
  case 3:
29018
- res = _a.sent();
29023
+ res = _b.sent();
29019
29024
  if (res.status === 200) {
29020
29025
  window.location.assign("/auth/login?redirectPath=" + redirectPathString);
29021
29026
  }