We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c1c9b84 + 0563447 commit 5dc683cCopy full SHA for 5dc683c
src/contexts/AuthObserver.tsx
@@ -75,8 +75,10 @@ export default function AuthObserver({ children }: { children: ReactNode }) {
75
76
if (route.startsWith("/profile") && auth && auth.emailVerified) {
77
const username = (router.query.username as string) || user?.username || "";
78
- dispatch(fetchUserProfile(username));
79
- dispatch(fetchAllProfileCommunities(auth?.displayName || ""));
+ if (username) {
+ dispatch(fetchUserProfile(username));
80
+ dispatch(fetchAllProfileCommunities(auth?.displayName || ""));
81
+ }
82
}
83
84
if (route.startsWith("/profile")) {
0 commit comments