1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: only update name if not undefined

This commit is contained in:
Ivar Conradi Østhus 2021-08-25 12:43:42 +02:00
parent 063a18793c
commit bb47c19d4d
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09

View File

@ -281,7 +281,7 @@ class UserService {
try {
user = await this.store.getByQuery({ email });
// Update user if autCreate is enabled.
if (user.name !== name) {
if (name && user.name !== name) {
user = await this.store.update(user.id, { name, email });
}
} catch (e) {