You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Don't crash if a keyshare request is removed
...during the time the dialog is displayed. Fixes https://github.com/vector-im/riot-web/issues/11745 (hopefully)
This commit is contained in:
@@ -111,6 +111,12 @@ export default class KeyRequestHandler {
|
|||||||
this._currentUser = null;
|
this._currentUser = null;
|
||||||
this._currentDevice = null;
|
this._currentDevice = null;
|
||||||
|
|
||||||
|
if (!this._pendingKeyRequests[userId] || !this._pendingKeyRequests[userId][deviceId]) {
|
||||||
|
// request was removed in the time the dialog was displayed
|
||||||
|
this._processNextRequest();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (r) {
|
if (r) {
|
||||||
for (const req of this._pendingKeyRequests[userId][deviceId]) {
|
for (const req of this._pendingKeyRequests[userId][deviceId]) {
|
||||||
req.share();
|
req.share();
|
||||||
|
|||||||
Reference in New Issue
Block a user