@schibsted/account-sdk-browser 4.8.7-beta.3 → 4.8.7-beta.4

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/es5/identity.js CHANGED
@@ -1531,26 +1531,25 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
1531
1531
  throw _context.t0;
1532
1532
  case 15:
1533
1533
  if (!sessionData) {
1534
- _context.next = 22;
1534
+ _context.next = 21;
1535
1535
  break;
1536
1536
  }
1537
1537
  if (!_checkRedirectionNeed(sessionData)) {
1538
- _context.next = 21;
1538
+ _context.next = 20;
1539
1539
  break;
1540
1540
  }
1541
1541
  _context.next = 19;
1542
1542
  return _this2.callbackBeforeRedirect();
1543
1543
  case 19:
1544
- _this2.window.location.href = _this2._sessionService.makeUrl(sessionData.redirectURL);
1545
- return _context.abrupt("return");
1546
- case 21:
1544
+ return _context.abrupt("return", _this2._sessionService.makeUrl(sessionData.redirectURL));
1545
+ case 20:
1547
1546
  if (_this2._enableSessionCaching) {
1548
1547
  _expiresIn = 1000 * (sessionData.expiresIn || 300);
1549
1548
  _this2.cache.set(HAS_SESSION_CACHE_KEY, sessionData, _expiresIn);
1550
1549
  }
1551
- case 22:
1550
+ case 21:
1552
1551
  return _context.abrupt("return", _postProcess(sessionData));
1553
- case 23:
1552
+ case 22:
1554
1553
  case "end":
1555
1554
  return _context.stop();
1556
1555
  }
@@ -1562,6 +1561,9 @@ var Identity = /*#__PURE__*/function (_EventEmitter) {
1562
1561
  }();
1563
1562
  this._hasSessionInProgress = _getSession().then(function (sessionData) {
1564
1563
  _this2._hasSessionInProgress = false;
1564
+ if (typeof sessionData === 'string' && Object(_validate_js__WEBPACK_IMPORTED_MODULE_55__["isUrl"])(sessionData)) {
1565
+ return _this2.window.location.href = sessionData;
1566
+ }
1565
1567
  return sessionData;
1566
1568
  }, function (err) {
1567
1569
  _this2.emit('error', err);
@@ -11924,7 +11926,7 @@ __webpack_require__.r(__webpack_exports__);
11924
11926
 
11925
11927
 
11926
11928
 
11927
- var version = '4.8.7-beta.3';
11929
+ var version = '4.8.7-beta.4';
11928
11930
  /* harmony default export */ __webpack_exports__["default"] = (version);
11929
11931
 
11930
11932
  /***/ })