forked from MapComplete/MapComplete
Fix: small fixes and crashes
This commit is contained in:
parent
33ec30339b
commit
d17d07ec52
4 changed files with 8 additions and 6 deletions
|
|
@ -16,7 +16,7 @@ export class ThemeSearchIndex {
|
|||
private readonly layerIndex: Fuse<{ id: string, description }>
|
||||
|
||||
constructor(language: string, themesToSearch?: MinimalThemeInformation[], layersToIgnore: string[] = []) {
|
||||
const themes = themesToSearch ?? ThemeSearch.officialThemes?.themes
|
||||
const themes = Utils.NoNull(themesToSearch ?? ThemeSearch.officialThemes?.themes)
|
||||
if (!themes) {
|
||||
throw "No themes loaded. Did generate:layeroverview fail?"
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ export class ThemeSearchIndex {
|
|||
]
|
||||
}
|
||||
|
||||
this.themeIndex = new Fuse(themes.filter(th => th.id !== "personal"), fuseOptions)
|
||||
this.themeIndex = new Fuse(themes.filter(th => th?.id !== "personal"), fuseOptions)
|
||||
|
||||
const toIgnore = new Set(layersToIgnore)
|
||||
const layersAsList: { id: string, description: Record<string, string[]> }[] = []
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import Translations from "../../UI/i18n/Translations"
|
|||
import { RegexTag } from "../Tags/RegexTag"
|
||||
import { Or } from "../Tags/Or"
|
||||
import FilterConfig from "../../Models/ThemeConfig/FilterConfig"
|
||||
import Constants from "../../Models/Constants"
|
||||
|
||||
export type ActiveFilter = {
|
||||
layer: LayerConfig
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue