Address review comments

This commit is contained in:
Richard van der Hoff 2017-06-05 17:58:11 +01:00
parent 7a9784fd6e
commit 32e3ea0601
3 changed files with 14 additions and 4 deletions

View file

@ -26,7 +26,7 @@ export default class KeyRequestHandler {
this._currentDevice = null;
// userId -> deviceId -> [keyRequest]
this._pendingKeyRequests = {};
this._pendingKeyRequests = Object.create(null);
}
handleKeyRequest(keyRequest) {
@ -35,7 +35,7 @@ export default class KeyRequestHandler {
const requestId = keyRequest.requestId;
if (!this._pendingKeyRequests[userId]) {
this._pendingKeyRequests[userId] = {};
this._pendingKeyRequests[userId] = Object.create(null);
}
if (!this._pendingKeyRequests[userId][deviceId]) {
this._pendingKeyRequests[userId][deviceId] = [];