Set displayName and description to undefined if no values are provided during a profile edit (#10016)
This commit is contained in:
@@ -176,8 +176,8 @@ export function useProfileUpdateMutation() {
|
|||||||
if (typeof updates === 'function') {
|
if (typeof updates === 'function') {
|
||||||
next = updates(next)
|
next = updates(next)
|
||||||
} else {
|
} else {
|
||||||
next.displayName = updates.displayName
|
next.displayName = updates.displayName || undefined
|
||||||
next.description = updates.description
|
next.description = updates.description || undefined
|
||||||
if ('pinnedPost' in updates) {
|
if ('pinnedPost' in updates) {
|
||||||
next.pinnedPost = updates.pinnedPost
|
next.pinnedPost = updates.pinnedPost
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user