forked from potsda.mn/mobilizon
Fix "Uncaught TypeError: localStorage is null" when localStorage is not available
This commit is contained in:
parent
4e7284b486
commit
494e791a99
|
@ -34,7 +34,7 @@ export function saveLocaleData(locale: string): void {
|
|||
}
|
||||
|
||||
export function getLocaleData(): string | null {
|
||||
return localStorage.getItem(USER_LOCALE);
|
||||
return localStorage ? localStorage.getItem(USER_LOCALE) : null;
|
||||
}
|
||||
|
||||
export function saveActorData(obj: IPerson): void {
|
||||
|
|
Loading…
Reference in a new issue