diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx
index 2642868fb2..d23be65a36 100644
--- a/src/view/com/profile/ProfileHeader.tsx
+++ b/src/view/com/profile/ProfileHeader.tsx
@@ -152,15 +152,10 @@ export const ProfileHeader = observer(function ProfileHeader({
}
return (
-
+
>
@@ -108,7 +106,7 @@ export function UserAvatar({
/>
- ) : isMe && userAvatar != null ? (
+ ) : userAvatar != null ? (
>
}) {
@@ -35,7 +33,9 @@ export function UserBanner({
width: 1500,
height: 500,
}).then(item => {
- setUserBanner(item.path)
+ if (setUserBanner != null) {
+ setUserBanner(item.path)
+ }
})
},
},
@@ -51,7 +51,9 @@ export function UserBanner({
width: 1500,
height: 500,
}).then(croppedItem => {
- setUserBanner(croppedItem.path)
+ if (setUserBanner != null) {
+ setUserBanner(croppedItem.path)
+ }
})
})
},
@@ -93,7 +95,7 @@ export function UserBanner({
/>
- ) : isMe && userBanner != null ? (
+ ) : userBanner != null ? (