@social-mail/social-mail-client 1.9.94 → 1.9.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.9.94",
3
+ "version": "1.9.95",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -337,28 +337,30 @@ class FileUploadWindow extends PopupWindow {
337
337
  </div>}
338
338
  />
339
339
  </div>);
340
- try {
340
+ this.app.runAsync(async () => {
341
+ try {
341
342
 
342
- const ct = new CancelToken();
343
+ const ct = new CancelToken();
343
344
 
344
- this.registerDisposable({
345
- dispose: () => {
346
- ct.cancel();
345
+ this.registerDisposable({
346
+ dispose: () => {
347
+ ct.cancel();
348
+ }
349
+ });
350
+
351
+ const tasks = this.files.map((x) => x.promise);
352
+ const files = await Promise.all(tasks);
353
+ const extra = this.parameters.extra;
354
+ this.close({ files, extra });
355
+ } catch (error) {
356
+ if (CancelToken.isCancelled(error)) {
357
+ this.cancel(error);
358
+ return;
347
359
  }
348
- });
349
-
350
- const tasks = this.files.map((x) => x.promise);
351
- const files = await Promise.all(tasks);
352
- const extra = this.parameters.extra;
353
- this.close({ files, extra });
354
- } catch (error) {
355
- if (CancelToken.isCancelled(error)) {
360
+ await PopupService.alert({ message: error });
356
361
  this.cancel(error);
357
- return;
358
362
  }
359
- await PopupService.alert({ message: error });
360
- this.cancel(error);
361
- }
363
+ });
362
364
  }
363
365
 
364
366
  }