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

don't clear expected type before including it in error

This commit is contained in:
Bruno Windels
2019-11-04 14:37:12 +01:00
parent 35adb75d80
commit 9140d5a091

View File

@@ -152,11 +152,11 @@ export default class VerificationBase extends EventEmitter {
this._resetTimer();
this._resolveEvent(e);
} else {
this._expectedEvent = undefined;
const exception = new Error(
"Unexpected message: expecting " + this._expectedEvent
+ " but got " + e.getType(),
);
this._expectedEvent = undefined;
if (this._rejectEvent) {
const reject = this._rejectEvent;
this._rejectEvent = undefined;