Skip to content

Commit

Permalink
fix: execute object creation in series, prevent object commit error
Browse files Browse the repository at this point in the history
  • Loading branch information
r0b1n committed Jan 16, 2025
1 parent 28440fe commit fccca54
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions packages/pluggableWidgets/file-uploader-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- We fixed an issue where an error occurred when uploading multiple files on a newly created context object.

## [1.0.1] - 2024-12-19

### Added

- The file uploader widget enables you to upload files by dragging and dropping them onto the widget or by using the file selection dialog.
2 changes: 1 addition & 1 deletion packages/pluggableWidgets/file-uploader-web/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@mendix/file-uploader-web",
"widgetName": "FileUploader",
"version": "1.0.0",
"version": "1.0.2",
"description": "",
"copyright": "© Mendix Technology BV 2024. All rights reserved.",
"private": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="FileUploader" version="1.0.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="FileUploader" version="1.0.2" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="FileUploader.xml" />
</widgetFiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export class FileUploaderStore {
}

this.lastSeenItems.add(item.id);

if (this.currentWaiting.length) {
this._createObjectAction!.execute();
}
}

get allowedFormatsDescription(): string {
Expand All @@ -121,9 +125,11 @@ export class FileUploaderStore {
}

return new Promise<ObjectItem>(resolve => {
this._createObjectAction!.execute();

this.currentWaiting.push(resolve);

if (this.currentWaiting.length === 1) {
this._createObjectAction!.execute();
}
});
}

Expand Down

0 comments on commit fccca54

Please sign in to comment.