fix: handle null values in User email transform (#1712)

pull/1716/head
TheCatLady 3 years ago committed by GitHub
parent 59b2ec11fa
commit 4a042f12be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -51,8 +51,8 @@ export class User {
@Column({
unique: true,
transformer: {
from: (value: string): string => value.toLowerCase(),
to: (value: string): string => value.toLowerCase(),
from: (value: string): string => (value ?? '').toLowerCase(),
to: (value: string): string => (value ?? '').toLowerCase(),
},
})
public email: string;

Loading…
Cancel
Save