diff --git a/src/Logic/Osm/Overpass.ts b/src/Logic/Osm/Overpass.ts index 9a4b53edb..f3e9ce15a 100644 --- a/src/Logic/Osm/Overpass.ts +++ b/src/Logic/Osm/Overpass.ts @@ -52,7 +52,7 @@ export class Overpass { return `${this._interpreterUrl}?data=${encodeURIComponent(query)}` } - public async ExecuteQuery(query: string): Promise<[FeatureCollection, Date]> { + private async ExecuteQuery(query: string): Promise<[FeatureCollection, Date]> { const json = await Utils.downloadJson(this.buildUrl(query)) if (json.elements.length === 0 && json.remark !== undefined) { diff --git a/src/Utils.ts b/src/Utils.ts index 7185b2ddc..0ca204a34 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -610,6 +610,11 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be * const target = {"id":"test"} * const result = Utils.Merge(source, target) * result // => {"id":"test","condition":{"and":["xyz"]}} + * + * const source = {"=name": {"en": "XYZ"}} + * const target = {"name":null, "x":"y"} + * const result = Utils.Merge(source, target) + * result // => {"name": {"en": "XYZ"}, "x": "y"} */ static Merge(source: Readonly, target: T): T & S { if (target === null) { @@ -1451,7 +1456,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be public static scrollIntoView(element: HTMLBaseElement | HTMLDivElement) { // Is the element completely in the view? const parentRect = Utils.findParentWithScrolling(element)?.getBoundingClientRect() - if(!parentRect){ + if (!parentRect) { return } const elementRect = element.getBoundingClientRect()