mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
better formatting
This commit is contained in:
parent
262cc8936e
commit
0292725076
@ -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 New Issue
Block a user