Skip to content

Commit 1ce97fb

Browse files
committed
fix: add missing trim to validate username
1 parent 02a33f7 commit 1ce97fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/classrooms/EditUserInClassroomButton.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class EditUserInClassroomButton extends Component {
7474
userId: teacherId,
7575
} = this.props;
7676

77-
const trimmedUsername = username;
77+
const trimmedUsername = username.trim();
7878

7979
if (!isUsernameValid(trimmedUsername)) {
8080
toastr.error(ERROR_MESSAGE_HEADER, ERROR_INVALID_USERNAME_MESSAGE);

0 commit comments

Comments
 (0)