DEV: Make uppy markdown resolvers async/await (#27117)

This commit is contained in:
Keegan George 2024-05-22 11:13:25 -07:00 committed by GitHub
parent 9d7f374c0f
commit 0d49571279
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,13 +319,13 @@ export default Mixin.create(ExtendableUploader, UppyS3Multipart, {
});
this._uppyInstance.on("upload-success", (file, response) => {
run(() => {
run(async () => {
if (!this._uppyInstance) {
return;
}
this._removeInProgressUpload(file.id);
let upload = response.body;
const markdown = this.uploadMarkdownResolvers.reduce(
const markdown = await this.uploadMarkdownResolvers.reduce(
(md, resolver) => resolver(upload) || md,
getUploadMarkdown(upload)
);