Skip to content

Commit

Permalink
Merge pull request #2717 from daostack/CW-crash-backpage
Browse files Browse the repository at this point in the history
Crash in backpage
  • Loading branch information
MeyerPV authored Jul 31, 2024
2 parents f085b2b + cfff514 commit e5cfcff
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,13 @@ const CommonMember: FC<CommonMemberProps> = ({
</div>
</div>
</div>
<div className="members__section__common-member-date">
{joinedAt
.toDate()
.toLocaleDateString("en-US", { month: "short", day: "numeric" })}
</div>
{joinedAt && joinedAt.toDate && (
<div className="members__section__common-member-date">
{joinedAt
?.toDate()
.toLocaleDateString("en-US", { month: "short", day: "numeric" })}
</div>
)}
<MemberDropdown
notMemberCircles={notMemberCircles}
memberName={memberName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const MembersComponent: FC<MembersComponentProps> = ({ common }) => {
() =>
[...commonMembers].sort(
(commonMember, prevCommonMember) =>
prevCommonMember.joinedAt.seconds - commonMember.joinedAt.seconds,
prevCommonMember.joinedAt?.seconds - commonMember.joinedAt?.seconds,
),
[commonMembers],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const MembersComponent: FC<MembersComponentProps> = (props) => {
() =>
[...commonMembers].sort(
(commonMember, prevCommonMember) =>
prevCommonMember.joinedAt.seconds - commonMember.joinedAt.seconds,
prevCommonMember.joinedAt?.seconds - commonMember.joinedAt?.seconds,
),
[commonMembers],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const ProfileContent: FC<ProfileContentProps> = (props) => {
<p className={styles.infoContent}>
Joined {common.name} at{" "}
{formatDate(
new Date(commonMember.joinedAt.seconds * 1000),
new Date(commonMember.joinedAt?.seconds * 1000),
DateFormat.SuperShortSecondary,
)}
</p>
Expand Down

0 comments on commit e5cfcff

Please sign in to comment.