Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit c12308b

Browse files
Merge pull request #563 from topcoder-platform/issues/timor/93
fixes issue#93
2 parents 7bb9cee + bb0398f commit c12308b

File tree

1 file changed

+3
-1
lines changed
  • client/src/components/AddToGroupModal

1 file changed

+3
-1
lines changed

client/src/components/AddToGroupModal/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function AddToGroupModal({ onCancel, updateUser, user }) {
111111

112112
const newGroup = await groupLib.createGroup(apiClient, groupName);
113113

114-
if (newGroup.id) {
114+
if (newGroup && newGroup.id) {
115115
const newOtherGroups = JSON.parse(JSON.stringify(otherGroups));
116116

117117
newOtherGroups.push(newGroup);
@@ -121,6 +121,8 @@ export default function AddToGroupModal({ onCancel, updateUser, user }) {
121121
alert(`Group with name ${groupName} created successfully`);
122122

123123
setFilter("");
124+
} else if (newGroup.message) {
125+
alert(newGroup.message);
124126
} else {
125127
alert("Group creation failed");
126128
}

0 commit comments

Comments
 (0)