Skip to content

Commit 1289b1e

Browse files
authored
fix: skip if task assignee have undefined (#1666)
* fix: skip if task assignee have undefined * test: add fixtures task data which have not assignee * fixtures: remove wrong data
1 parent 83573ed commit 1289b1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/users.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ const getUsers = async (req, res) => {
184184
const usersData = [];
185185

186186
tasksData.forEach((task) => {
187-
userIds.add(task.assignee);
187+
if (task.assignee) {
188+
userIds.add(task.assignee);
189+
}
188190
});
189191

190192
const userInfo = await dataAccess.retrieveUsers({ userIds: Array.from(userIds) });

0 commit comments

Comments
 (0)