@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.
@@ -838,8 +838,16 @@ class StorageService {
838
838
  this.prefix = '';
839
839
  // Set storage
840
840
  const type = moduleConfig.storageType ? moduleConfig.storageType : 'local';
841
- if (window[type + 'Storage']) {
842
- this.storage = window[type + 'Storage'];
841
+ if (type === 'session') {
842
+ this.storage = sessionStorage;
843
+ }
844
+ else {
845
+ if (localStorage) {
846
+ this.storage = localStorage;
847
+ }
848
+ else {
849
+ this.storage = null;
850
+ }
843
851
  }
844
852
  // Set prefix
845
853
  this.prefix = '';