diff --git a/Logic/BBox.ts b/Logic/BBox.ts index 1aa9d08827..aa8e699356 100644 --- a/Logic/BBox.ts +++ b/Logic/BBox.ts @@ -209,9 +209,9 @@ export class BBox { } - private check() { + private check() { if (isNaN(this.maxLon) || isNaN(this.maxLat) || isNaN(this.minLon) || isNaN(this.minLat)) { - console.log(this); + console.trace("BBox with NaN detected:", this); throw "BBOX has NAN"; } } diff --git a/UI/Popup/ImportButton.ts b/UI/Popup/ImportButton.ts index 1f96829e31..f6f5337aa7 100644 --- a/UI/Popup/ImportButton.ts +++ b/UI/Popup/ImportButton.ts @@ -504,14 +504,23 @@ export class ImportWayButton extends AbstractImportButton implements AutoAction mergeConfigs, "import" ) - } else { - + } else if(feature.geometry.type === "Polygon"){ + const outer = coors[0] + return new CreateWayWithPointReuseAction( + args.newTags.data, + outer, + state, + mergeConfigs + ) + }else if(feature.geometry.type === "LineString"){ return new CreateWayWithPointReuseAction( args.newTags.data, coors, state, mergeConfigs ) + }else{ + throw "Unsupported type" } } }