Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
viet nguyen committed May 20, 2023
1 parent aa92761 commit 26fdf95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/model/UserDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class UserDataSource extends MongoDataSource<User> {
throw new Error('Nothing to update. Must provide at least one field.')
}

if (!isValidUsername(_username)) {
if (_username != null && !isValidUsername(_username)) {
throw new Error('Invalid username format.')
}

Expand Down

0 comments on commit 26fdf95

Please sign in to comment.