better formatting

This commit is contained in:
Bruno Windels 2020-11-13 19:10:18 +01:00
parent 262cc8936e
commit 0292725076

View file

@ -45,7 +45,9 @@ export class AttachmentUpload {
if (this._status.get() === UploadStatus.Waiting) { if (this._status.get() === UploadStatus.Waiting) {
this._upload(); this._upload();
} }
await this._status.waitFor(s => s === UploadStatus.Error || s === UploadStatus.Uploaded).promise; await this._status.waitFor(s => {
return s === UploadStatus.Error || s === UploadStatus.Uploaded;
}).promise;
if (this._status.get() === UploadStatus.Error) { if (this._status.get() === UploadStatus.Error) {
throw this._error; throw this._error;
} }