Commit 4d444e91 authored by NataliaTepluhina's avatar NataliaTepluhina Committed by Natalia Tepluhina

Added cases for projectMembers

parent 95c4e171
...@@ -535,7 +535,9 @@ export default { ...@@ -535,7 +535,9 @@ export default {
}) })
.then(({ data }) => { .then(({ data }) => {
const [firstError] = data.workspace.errors || []; const [firstError] = data.workspace.errors || [];
const assignees = data.workspace.assignees.nodes.map(({ user }) => user); const assignees = data.workspace.assignees.nodes
.filter((x) => x?.user)
.map(({ user }) => user);
if (firstError) { if (firstError) {
throw new Error(firstError); throw new Error(firstError);
...@@ -543,7 +545,7 @@ export default { ...@@ -543,7 +545,7 @@ export default {
commit( commit(
types.RECEIVE_ASSIGNEES_SUCCESS, types.RECEIVE_ASSIGNEES_SUCCESS,
// User field is nullable and we only want to display non-null users // User field is nullable and we only want to display non-null users
assignees.filter((u) => u), assignees,
); );
}) })
.catch((e) => { .catch((e) => {
......
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
}; };
}, },
update({ project: { projectMembers: { nodes = [] } = {} } = {} } = {}) { update({ project: { projectMembers: { nodes = [] } = {} } = {} } = {}) {
return nodes.map(({ user }) => ({ ...user })); return nodes.filter((x) => x?.user).map(({ user }) => ({ ...user }));
}, },
error(error) { error(error) {
this.error = error; this.error = error;
......
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