@salesgenterp/ui-components 0.4.82 → 0.4.84

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.js CHANGED
@@ -3560,7 +3560,7 @@ var loadCachedTableState = function loadCachedTableState(_ref2) {
3560
3560
 
3561
3561
  var ErCache = /*#__PURE__*/function () {
3562
3562
  function ErCache() {
3563
- this.sessionStorage = window.sessionStorage;
3563
+ this.sessionStorage = typeof window !== 'undefined' ? window.sessionStorage : {};
3564
3564
  }
3565
3565
 
3566
3566
  var _proto = ErCache.prototype;
@@ -3854,7 +3854,8 @@ var handle401Error = function handle401Error(_ref4) {
3854
3854
  }
3855
3855
  });
3856
3856
  }, function () {
3857
- window.dispatchEvent(new Event('authError'));
3857
+ var isWindow = typeof window !== 'undefined';
3858
+ isWindow && window.dispatchEvent(new Event('authError'));
3858
3859
  exception.message = 'Your session is expired, please login again to continue.';
3859
3860
 
3860
3861
  if (exception.reason) {