From 24e1e9d9d8786bc16aa7364ae4f340cba0b772a1 Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 26 May 2023 21:09:45 +0200 Subject: [PATCH] fix undefined on mobile --- src/components/modals/ReplyModal.jsx | 2 +- src/components/views/Board.jsx | 4 ++-- src/components/views/Catalog.jsx | 4 ++-- src/components/views/Pending.jsx | 4 ++-- src/components/views/Thread.jsx | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/modals/ReplyModal.jsx b/src/components/modals/ReplyModal.jsx index fa5415b3..8ccbdb09 100644 --- a/src/components/modals/ReplyModal.jsx +++ b/src/components/modals/ReplyModal.jsx @@ -225,7 +225,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
- {account.author?.displayName ? ( + {account && account.author && account.author.displayName ? ( ) : ( diff --git a/src/components/views/Board.jsx b/src/components/views/Board.jsx index 8ffc63e7..0dd650ac 100644 --- a/src/components/views/Board.jsx +++ b/src/components/views/Board.jsx @@ -639,8 +639,8 @@ const Board = () => { Name - {account.author.displayName ? ( - + {account && account.author && account.author.displayName ? ( + ) : ( )} diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx index f236050d..7b6e8120 100644 --- a/src/components/views/Catalog.jsx +++ b/src/components/views/Catalog.jsx @@ -565,8 +565,8 @@ const Catalog = () => { Name - {account.author.displayName ? ( - + {account && account.author && account.author.displayName ? ( + ) : ( )} diff --git a/src/components/views/Pending.jsx b/src/components/views/Pending.jsx index 1dbdbfb7..480b5d7c 100644 --- a/src/components/views/Pending.jsx +++ b/src/components/views/Pending.jsx @@ -285,7 +285,7 @@ const Pending = () => {     - (u/{account.author.shortAddress}) + (u/{account.author?.shortAddress})   {getDate(comment?.timestamp)} @@ -326,7 +326,7 @@ const Pending = () => { Anonymous}   - (u/{account.author.shortAddress})  + (u/{account.author?.shortAddress}) 
{comment.title ? ( diff --git a/src/components/views/Thread.jsx b/src/components/views/Thread.jsx index 4bec56a8..21104f32 100644 --- a/src/components/views/Thread.jsx +++ b/src/components/views/Thread.jsx @@ -614,8 +614,8 @@ const Thread = () => { Name - {account.author.displayName ? ( - + {account && account.author && account.author.displayName ? ( + ) : ( )}