fix undefined on mobile

This commit is contained in:
Tom
2023-05-26 21:09:45 +02:00
parent b1db4f1776
commit 24e1e9d9d8
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -639,8 +639,8 @@ const Board = () => {
<tr data-type="Name">
<td id="td-name">Name</td>
<td>
{account.author.displayName ? (
<input name="name" type="text" tabIndex={1} value={account.author.displayName} ref={nameRef} disabled />
{account && account.author && account.author.displayName ? (
<input name="name" type="text" tabIndex={1} value={account.author?.displayName} ref={nameRef} disabled />
) : (
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
)}