From 27a43fdbe019ed82c4492f6924c9d778a15c54ec Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 3 Oct 2021 21:53:31 +0200 Subject: [PATCH] Changes: expand try block; remove console.logs --- Logic/Osm/Changes.ts | 14 +++++++------- UI/Popup/TagRenderingQuestion.ts | 7 ------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Logic/Osm/Changes.ts b/Logic/Osm/Changes.ts index 570bf553be..866c78c7a2 100644 --- a/Logic/Osm/Changes.ts +++ b/Logic/Osm/Changes.ts @@ -111,14 +111,14 @@ export class Changes { } private async flushChangesAsync(flushreason: string = undefined): Promise { - console.log("Beginning upload... " + flushreason ?? ""); - // At last, we build the changeset and upload const self = this; - const pending = self.pendingChanges.data; - const neededIds = Changes.GetNeededIds(pending) - const osmObjects = await Promise.all(neededIds.map(id => OsmObject.DownloadObjectAsync(id))); - console.log("Got the fresh objects!", osmObjects, "pending: ", pending) try { + console.log("Beginning upload... " + flushreason ?? ""); + // At last, we build the changeset and upload + const pending = self.pendingChanges.data; + const neededIds = Changes.GetNeededIds(pending) + const osmObjects = await Promise.all(neededIds.map(id => OsmObject.DownloadObjectAsync(id))); + console.log("Got the fresh objects!", osmObjects, "pending: ", pending) const changes: { newObjects: OsmObject[], modifiedObjects: OsmObject[] @@ -311,6 +311,6 @@ export class Changes { } public registerIdRewrites(mappings: Map): void { - + } } \ No newline at end of file diff --git a/UI/Popup/TagRenderingQuestion.ts b/UI/Popup/TagRenderingQuestion.ts index 40a68609db..a4eb83b0fb 100644 --- a/UI/Popup/TagRenderingQuestion.ts +++ b/UI/Popup/TagRenderingQuestion.ts @@ -66,9 +66,6 @@ export default class TagRenderingQuestion extends Combine { return applicableMappings })); - applicableMappingsSrc.addCallbackAndRun(appl => console.log("Currently applicable renderings are:", appl.map(m => m.then.txt).join(", "))) - - if (configuration === undefined) { throw "A question is needed for a question visualization" } @@ -84,12 +81,8 @@ export default class TagRenderingQuestion extends Combine { )) - // inputElement.GetValue().addCallbackAndRun(s => console.trace(configuration.question.txt, "Current selection is ", s)) - const save = () => { - console.log("OnSaveTriggered", inputElement) const selection = inputElement.GetValue().data; - console.log("Saving changes", selection) if (selection) { (State.state?.changes ?? new Changes()) .applyAction(new ChangeTagAction(