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

More modern loop syntax

This commit is contained in:
David Baker
2018-10-31 18:18:41 +00:00
parent c5e7bedb37
commit f5846b89ea

View File

@@ -133,15 +133,9 @@ export default class DeviceList {
this._syncToken = deviceData ? deviceData.syncToken : null;
}
this._userByIdentityKey = {};
for (const user in this._devices) {
if (!this._devices.hasOwnProperty(user)) {
continue;
}
for (const user of Object.keys(this._devices)) {
const userDevices = this._devices[user];
for (const device in userDevices) {
if (!userDevices.hasOwnProperty(device)) {
continue;
}
for (const device of Object.keys(userDevices)) {
const idKey = userDevices[device].keys['curve25519:'+device];
if (idKey !== undefined) {
this._userByIdentityKey[idKey] = user;