Skip to content

Scheduling infrastructure for absolutely everyone.

fix/profile-dont-wait-for-avatar (#12080)

sean-brydon327159c2ae45
diff --git a/apps/web/pages/settings/my-account/profile.tsx b/apps/web/pages/settings/my-account/profile.tsx
index bfe82cdc273..7b1d873dd8e 100644
--- a/apps/web/pages/settings/my-account/profile.tsx
+++ b/apps/web/pages/settings/my-account/profile.tsx
@@ -78,8 +78,8 @@ type FormValues = {
bio: string;
};
-const checkIfItFallbackImage = (fetchedImgSrc: string) => {
- return fetchedImgSrc.endsWith(AVATAR_FALLBACK);
+const checkIfItFallbackImage = (fetchedImgSrc?: string) => {
+ return !fetchedImgSrc || fetchedImgSrc.endsWith(AVATAR_FALLBACK);
};
const ProfileView = () => {
@@ -226,10 +226,11 @@ const ProfileView = () => {
[ErrorCode.ThirdPartyIdentityProviderEnabled]: t("account_created_with_identity_provider"),
};
- if (isLoading || !user || fetchedImgSrc === undefined)
+ if (isLoading || !user) {
return (
<SkeletonLoader title={t("profile")} description={t("profile_description", { appName: APP_NAME })} />
);
+ }
const defaultValues = {
username: user.username || "",