From 4fbf5679329872fafb897341748714ab6166a49d Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 2 Sep 2022 13:43:14 +0200 Subject: [PATCH] Fix build --- .../Sources/NewGeometryFromChangesFeatureSource.ts | 6 ++++-- UI/Popup/DeleteWizard.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts b/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts index 19f4511e79..777e639b3f 100644 --- a/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts +++ b/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts @@ -4,6 +4,7 @@ import FeatureSource from "../FeatureSource"; import {UIEventSource} from "../../UIEventSource"; import {ChangeDescription} from "../../Osm/Actions/ChangeDescription"; import {ElementStorage} from "../../ElementStorage"; +import {OsmId, OsmTags} from "../../../Models/OsmFeature"; export class NewGeometryFromChangesFeatureSource implements FeatureSource { // This class name truly puts the 'Java' into 'Javascript' @@ -86,11 +87,12 @@ export class NewGeometryFromChangesFeatureSource implements FeatureSource { try { - const tags = {} + const tags: OsmTags = { + id: (change.type + "/" + change.id) + } for (const kv of change.tags) { tags[kv.k] = kv.v } - tags["id"] = change.type + "/" + change.id tags["_backend"] = backendUrl diff --git a/UI/Popup/DeleteWizard.ts b/UI/Popup/DeleteWizard.ts index 5bd7c3228d..86f78bb686 100644 --- a/UI/Popup/DeleteWizard.ts +++ b/UI/Popup/DeleteWizard.ts @@ -350,7 +350,7 @@ class DeleteabilityChecker { if (allByMyself.data === null && useTheInternet) { // We kickoff the download here as it hasn't yet been downloaded. Note that this is mapped onto 'all by myself' above - const hist = OsmObject.DownloadHistory(id).map(versions => versions.map(version => version.tags["_last_edit:contributor:uid"])) + const hist = OsmObject.DownloadHistory(id).map(versions => versions.map(version => Number(version.tags["_last_edit:contributor:uid"]))) hist.addCallbackAndRunD(hist => previousEditors.setData(hist)) }