forked from MapComplete/MapComplete
Fixes to import flow
This commit is contained in:
parent
2c1144cf10
commit
bce8ae3e34
4 changed files with 32 additions and 16 deletions
|
@ -217,7 +217,7 @@ export default class ConflationChecker extends Combine implements FlowStep<{ fea
|
|||
new Title(t.titleLive),
|
||||
t.importCandidatesCount.Subs({count:toImport.features.length }),
|
||||
new VariableUiElement(geojson.map(geojson => {
|
||||
if(geojson?.features?.length === undefined && geojson?.features?.length === 0){
|
||||
if(geojson?.features?.length === undefined || geojson?.features?.length === 0){
|
||||
return t.nothingLoaded.Subs(layer).SetClass("alert")
|
||||
}
|
||||
return new Combine([
|
||||
|
@ -233,7 +233,7 @@ export default class ConflationChecker extends Combine implements FlowStep<{ fea
|
|||
new Combine([t.mapShowingNearbyIntro, nearbyCutoff]).SetClass("flex"),
|
||||
new VariableUiElement(toImportWithNearby.features.map(feats =>
|
||||
t.nearbyWarn.Subs({count: feats.length}).SetClass("alert"))),
|
||||
,t.setRangeToZero,
|
||||
t.setRangeToZero,
|
||||
matchedFeaturesMap]).SetClass("flex flex-col")
|
||||
|
||||
super([
|
||||
|
@ -246,7 +246,7 @@ export default class ConflationChecker extends Combine implements FlowStep<{ fea
|
|||
return new Loading(t.states.running)
|
||||
}
|
||||
if (d["error"] !== undefined) {
|
||||
return t.states.error.Subs(d).SetClass("alert")
|
||||
return t.states.error.Subs({error: d["error"]}).SetClass("alert")
|
||||
}
|
||||
|
||||
if (d === "cached") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue