From 02927250765698bcdfd6ec5baace830564d9ae9a Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 13 Nov 2020 19:10:18 +0100 Subject: [PATCH] better formatting --- src/matrix/room/AttachmentUpload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/matrix/room/AttachmentUpload.js b/src/matrix/room/AttachmentUpload.js index 356bb5a7..013bf150 100644 --- a/src/matrix/room/AttachmentUpload.js +++ b/src/matrix/room/AttachmentUpload.js @@ -45,7 +45,9 @@ export class AttachmentUpload { if (this._status.get() === UploadStatus.Waiting) { 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) { throw this._error; }