Skip to content

Commit

Permalink
fix: add missing trim to validate username
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia committed May 27, 2020
1 parent 02a33f7 commit 1ce97fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/classrooms/EditUserInClassroomButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class EditUserInClassroomButton extends Component {
userId: teacherId,
} = this.props;

const trimmedUsername = username;
const trimmedUsername = username.trim();

if (!isUsernameValid(trimmedUsername)) {
toastr.error(ERROR_MESSAGE_HEADER, ERROR_INVALID_USERNAME_MESSAGE);
Expand Down

0 comments on commit 1ce97fb

Please sign in to comment.