forked from mystiq/hydrogen-web
better formatting
This commit is contained in:
parent
262cc8936e
commit
0292725076
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue