Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

do not assume user

Sara Vieirac5843bf5075f
diff --git a/app/dashboard/components/header.tsx b/app/dashboard/components/header.tsx
index ee3731bb8a..fda056ba67 100644
--- a/app/dashboard/components/header.tsx
+++ b/app/dashboard/components/header.tsx
@@ -14,7 +14,7 @@ import { useNavigate } from "react-router-dom";
export const DashboardHeader = ({ user }: { user: User }) => {
const navigate = useNavigate();
- const userNameFallback = (user.username || user.email || "X")
+ const userNameFallback = (user?.username || user?.email || "X")
.charAt(0)
.toLocaleUpperCase();