mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix undefined account
This commit is contained in:
@@ -30,8 +30,10 @@ const SettingsModal = ({ isOpen, closeModal }) => {
|
||||
const { accounts } = useAccounts();
|
||||
|
||||
const accountJson = useMemo(() => {
|
||||
const { plebbit, ...restOfAccount } = account;
|
||||
return stringify({ account: restOfAccount });
|
||||
if (account) {
|
||||
const { plebbit, ...restOfAccount } = account;
|
||||
return stringify({ account: restOfAccount });
|
||||
}
|
||||
}, [account]);
|
||||
|
||||
const [editedAccountJson, setEditedAccountJson] = useState(accountJson);
|
||||
|
||||
Reference in New Issue
Block a user