Merge branch 'issue-1119' into 'main'

Fix "Uncaught TypeError: localStorage is null" when localStorage is not available

Closes #1119

See merge request framasoft/mobilizon!1250
This commit is contained in:
Thomas Citharel 2022-06-06 12:37:27 +00:00
commit fa7a10bd13

View File

@ -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 {