@lenne.tech/ng-base 14.16.3 → 14.16.5

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.
@@ -820,8 +820,16 @@ class StorageService {
820
820
  this.prefix = '';
821
821
  // Set storage
822
822
  const type = moduleConfig.storageType ? moduleConfig.storageType : 'local';
823
- if (window[type + 'Storage']) {
824
- this.storage = window[type + 'Storage'];
823
+ if (type === 'session') {
824
+ this.storage = sessionStorage;
825
+ }
826
+ else {
827
+ if (localStorage) {
828
+ this.storage = localStorage;
829
+ }
830
+ else {
831
+ this.storage = null;
832
+ }
825
833
  }
826
834
  // Set prefix
827
835
  this.prefix = '';