forked from MapComplete/MapComplete
Fix: crash in search code
This commit is contained in:
parent
0cbfa325f6
commit
feb0d47aec
1 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ export default class SearchState {
|
||||||
.mapD(list => list.map(sugg => sugg.results))
|
.mapD(list => list.map(sugg => sugg.results))
|
||||||
|
|
||||||
const isRunningPerEngine: Store<Store<GeocodingProvider>[]> =
|
const isRunningPerEngine: Store<Store<GeocodingProvider>[]> =
|
||||||
suggestionsListWithSource.map(
|
suggestionsListWithSource.mapD(
|
||||||
allProviders => allProviders.map(provider =>
|
allProviders => allProviders.map(provider =>
|
||||||
provider.results.map(result => {
|
provider.results.map(result => {
|
||||||
if (result === undefined) {
|
if (result === undefined) {
|
||||||
|
@ -102,7 +102,7 @@ export default class SearchState {
|
||||||
return []
|
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.suggestionsSearchRunning = this.runningEngines.map(running => running?.length > 0)
|
||||||
this.suggestions = suggestionsList.bindD((suggestions) =>
|
this.suggestions = suggestionsList.bindD((suggestions) =>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue