MM-13552: use .size, not .length, for Set returned from getUserIdsInChannels (#2217)

* MM-13552: use .size, not .length, for Set returned from getUserIdsInChannels

* simplify to new Set()
parent 9768d581
......@@ -207,8 +207,8 @@ export async function loadProfilesForGM() {
continue;
}
const userIds = userIdsInChannels[channel.id] || [];
if (userIds.length >= Constants.MIN_USERS_IN_GM) {
const userIds = userIdsInChannels[channel.id] || new Set();
if (userIds.size >= Constants.MIN_USERS_IN_GM) {
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment