core: fix user profile cleared on clearing an profile data

This commit is contained in:
Ammar Ahmed
2024-03-22 08:34:56 +05:00
parent 097c6915fb
commit 6dfbb27c33

View File

@@ -203,10 +203,7 @@ export class Settings implements ICollection {
}
setProfile(partial: Partial<Profile> | undefined) {
const profile =
partial === undefined || (!partial.fullName && !partial.profilePicture)
? undefined
: { ...this.getProfile(), ...partial };
const profile = !partial ? undefined : { ...this.getProfile(), ...partial };
return this.set("profile", profile);
}
}