diff --git a/packages/app/src/App.jsx b/packages/app/src/App.jsx index 317aaf93..6cb18a85 100755 --- a/packages/app/src/App.jsx +++ b/packages/app/src/App.jsx @@ -334,6 +334,15 @@ class App extends React.Component { return window.app.setLocation(config.app.mainPath ?? "/home") }, goToAccount: (username) => { + if (!username) { + if (!app.userData) { + console.error("Cannot go to account, no username provided and no user logged in") + return false + } + + username = app.userData.username + } + return window.app.setLocation(`/@${username}`) }, goToPost: (id) => {