From 383ffffd0d0728a7dffe43ddde0399fc4abffb77 Mon Sep 17 00:00:00 2001 From: rain2o Date: Tue, 27 Jun 2023 18:45:22 +0100 Subject: [PATCH 1/2] Override isLoading only if accountID is invalid --- src/pages/ProfilePage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 6b59315bbc3c..05e177dfdc0d 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -101,7 +101,11 @@ function ProfilePage(props) { } }, [accountID]); - const details = lodashGet(props.personalDetails, accountID, {isLoading: ValidationUtils.isValidAccountRoute(accountID)}); +const details = lodashGet( + props.personalDetails, + accountID, + ValidationUtils.isValidAccountRoute(accountID) ? {} : {isloading: false}, +); const displayName = details.displayName ? details.displayName : props.translate('common.hidden'); const avatar = lodashGet(details, 'avatar', UserUtils.getDefaultAvatar()); From 3080043774efe95bbd9544994b0c4c6ebe4961ea Mon Sep 17 00:00:00 2001 From: rain2o Date: Tue, 27 Jun 2023 18:45:22 +0100 Subject: [PATCH 2/2] Override isLoading only if accountID is invalid --- src/pages/ProfilePage.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 05e177dfdc0d..1a881d2dec84 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -101,11 +101,7 @@ function ProfilePage(props) { } }, [accountID]); -const details = lodashGet( - props.personalDetails, - accountID, - ValidationUtils.isValidAccountRoute(accountID) ? {} : {isloading: false}, -); + const details = lodashGet(props.personalDetails, accountID, ValidationUtils.isValidAccountRoute(accountID) ? {} : {isloading: false}); const displayName = details.displayName ? details.displayName : props.translate('common.hidden'); const avatar = lodashGet(details, 'avatar', UserUtils.getDefaultAvatar());