[ADF-2265] fix user preference null value (#2948)

* fix user preference null value

* fix method call test public
This commit is contained in:
Eugenio Romano
2018-02-15 09:30:35 +00:00
committed by Denys Vuika
parent 63a146616b
commit 6e57cd3e17
4 changed files with 11 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ export class UserPreferencesService {
get(property: string, defaultValue?: string): string {
const key = this.getPropertyKey(property);
const value = this.storage.getItem(key);
if (value === undefined) {
if (value === undefined || value === null) {
return defaultValue;
}
return value;