1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-01 04:43:29 +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._resetTimer();
this._resolveEvent(e); this._resolveEvent(e);
} else { } else {
this._expectedEvent = undefined;
const exception = new Error( const exception = new Error(
"Unexpected message: expecting " + this._expectedEvent "Unexpected message: expecting " + this._expectedEvent
+ " but got " + e.getType(), + " but got " + e.getType(),
); );
this._expectedEvent = undefined;
if (this._rejectEvent) { if (this._rejectEvent) {
const reject = this._rejectEvent; const reject = this._rejectEvent;
this._rejectEvent = undefined; this._rejectEvent = undefined;