@yomotech/view-toolkit 0.0.24 → 0.0.26

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.
@@ -365,7 +365,15 @@ class UtilityService {
365
365
  }
366
366
  else {
367
367
  const value = localStorage.getItem(key);
368
- return value ? JSON.parse(value) : null;
368
+ if (value === null) {
369
+ return null;
370
+ }
371
+ try {
372
+ return JSON.parse(value);
373
+ }
374
+ catch {
375
+ return value;
376
+ }
369
377
  }
370
378
  }
371
379
  async showAllProjects() {
@@ -2751,7 +2759,7 @@ class ConfigService {
2751
2759
  }
2752
2760
  else {
2753
2761
  tenantName = await this.utilityService.getStorage('tenantName');
2754
- selectedTenant = await this.utilityService.getStorage('selectedTenant');
2762
+ selectedTenant = await this.utilityService.getLocalStorage('selectedTenant');
2755
2763
  }
2756
2764
  const env = await this.couchdbService.getFileContentFromCouchDb(`${tenantName ? tenantName : selectedTenant}_${projectName}`, 'environments/environment.json');
2757
2765
  if (env?.environment?.login.type === "keycloak") {