Fix: crash in search code

This commit is contained in:
Pieter Vander Vennet 2025-07-24 19:30:22 +02:00
parent 0cbfa325f6
commit feb0d47aec

View file

@ -73,7 +73,7 @@ export default class SearchState {
.mapD(list => list.map(sugg => sugg.results))
const isRunningPerEngine: Store<Store<GeocodingProvider>[]> =
suggestionsListWithSource.map(
suggestionsListWithSource.mapD(
allProviders => allProviders.map(provider =>
provider.results.map(result => {
if (result === undefined) {
@ -102,7 +102,7 @@ export default class SearchState {
return []
}
}),
))).map(list => Utils.NoNull(list.flatMap(x => x)))
))).map(list => Utils.NoNull(list?.flatMap(x => x) ?? []))
this.suggestionsSearchRunning = this.runningEngines.map(running => running?.length > 0)
this.suggestions = suggestionsList.bindD((suggestions) =>