From 48f086279ceb34451950290892ca7a2515f96eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 7 Jan 2020 10:39:35 -0500 Subject: [PATCH] fix: don't crash if groupData is missing --- src/groups/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/groups/index.js b/src/groups/index.js index c1422da25a..00abdf94df 100644 --- a/src/groups/index.js +++ b/src/groups/index.js @@ -78,7 +78,8 @@ Groups.getGroupsBySort = async function (sort, start, stop) { Groups.getNonPrivilegeGroups = async function (set, start, stop) { let groupNames = await db.getSortedSetRevRange(set, start, stop); groupNames = groupNames.concat(Groups.ephemeralGroups).filter(groupName => !Groups.isPrivilegeGroup(groupName)); - return await Groups.getGroupsData(groupNames); + const groupsData = await Groups.getGroupsData(groupNames); + return groupsData.filter(Boolean); }; Groups.getGroups = async function (set, start, stop) {