1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-02 17:02:31 +03:00

add FIXME note for (expected) uncaught rejection

This commit is contained in:
Bruno Windels
2019-11-06 12:36:50 +01:00
parent a9dba39623
commit 62e490cfe4

View File

@@ -222,6 +222,8 @@ export default class VerificationBase extends EventEmitter {
// but no reject function. If cancel is called again, we'd error.
if (this._reject) this._reject(e);
} else {
// FIXME: this causes an "Uncaught promise" console message
// if nothing ends up chaining this promise.
this._promise = Promise.reject(e);
}
// Also emit a 'cancel' event that the app can listen for to detect cancellation