Fixed some stuff not getting checked against null
ref #39 gosh i sometimes hate js types
This commit is contained in:
@@ -88,7 +88,7 @@ export class UpdateUser {
|
||||
public async updateUser(user: User): Promise<User> {
|
||||
user.email = this.email;
|
||||
user.username = this.username;
|
||||
if (user.email === undefined && user.username === undefined) {
|
||||
if ((user.email === undefined || user.email === null) && (user.username === undefined || user.username === null)) {
|
||||
throw new UsernameOrEmailNeededError();
|
||||
}
|
||||
if (this.password) {
|
||||
|
||||
Reference in New Issue
Block a user