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:
commit
fa7a10bd13
@ -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 New Issue
Block a user