Properly wire 'async' through the uploader

This commit is contained in:
Pieter Vander Vennet 2022-09-02 12:39:40 +02:00
parent 89b9cb4b47
commit cbf5c5a748
4 changed files with 19 additions and 18 deletions

View file

@ -1062,9 +1062,9 @@ export default class SpecialVisualizations {
const t = Translations.t.notes;
const id = tags.data[args[0] ?? "id"]
const uploader = new ImgurUploader(url => {
const uploader = new ImgurUploader(async url => {
isUploading.setData(false)
state.osmConnection.addCommentToNote(id, url)
await state.osmConnection.addCommentToNote(id, url)
NoteCommentElement.addCommentTo(url, tags, state)
})