Skip to content

Commit 4850cf4

Browse files
committed
refactor: replace nullish coalescing with ternary operator for image and bgImage in ProfileEditMain initialValues
1 parent e190b28 commit 4850cf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web-marketplace/src/pages/ProfileEdit/ProfileEdit.Main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ export const ProfileEditMain = () => {
6060
return {
6161
name: name ? name : _(DEFAULT_NAME),
6262
description: description?.trimEnd() ?? '',
63-
profileImage: image ?? defaultAvatar,
64-
backgroundImage: bgImage ?? DEFAULT_PROFILE_BG,
63+
profileImage: image ? image : defaultAvatar,
64+
backgroundImage: bgImage ? bgImage : DEFAULT_PROFILE_BG,
6565
profileType: type ?? DEFAULT_PROFILE_TYPE,
6666
twitterLink: twitterLink ?? '',
6767
websiteLink: websiteLink ?? '',

0 commit comments

Comments
 (0)