From 9140d5a091457ec1e50cdf4036ae3dbf1688aad6 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 4 Nov 2019 14:37:12 +0100 Subject: [PATCH] don't clear expected type before including it in error --- src/crypto/verification/Base.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/verification/Base.js b/src/crypto/verification/Base.js index dbb244f29..8275cfa1b 100644 --- a/src/crypto/verification/Base.js +++ b/src/crypto/verification/Base.js @@ -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;