forked from MapComplete/MapComplete
Fix: fix broken index page for anonymous users
This commit is contained in:
parent
d9c8785d9b
commit
6260bc2897
2 changed files with 9 additions and 6 deletions
|
@ -350,10 +350,10 @@ export default class UserRelatedState {
|
|||
* List of all hidden themes that have been seen before
|
||||
* @param osmConnection
|
||||
*/
|
||||
public static initDiscoveredHiddenThemes(osmConnection: OsmConnection): Store<string[]> {
|
||||
public static initDiscoveredHiddenThemes(osmConnection: OsmConnection): Store<undefined | string[]> {
|
||||
const prefix = "mapcomplete-hidden-theme-"
|
||||
const userPreferences = osmConnection.preferencesHandler.allPreferences
|
||||
return userPreferences.map((preferences) =>
|
||||
return userPreferences.mapD((preferences) =>
|
||||
Object.keys(preferences)
|
||||
.filter((key) => key.startsWith(prefix))
|
||||
.map((key) => key.substring(prefix.length, key.length - "-enabled".length))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue