From e7993f9550b7ec5618d0a5ee601387b09c6d70b5 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Thu, 31 Dec 2020 17:16:15 -0500 Subject: [PATCH] Fixed issue with profiles not loading when account is not fetched from DB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed: - issue with profiles not loading when account is not fetched from DB. Like if on profile then click a account from "x reposted y", x would not load because the ProfilePage component was not fetching on update, only mount. --- app/javascript/gabsocial/pages/profile_page.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/javascript/gabsocial/pages/profile_page.js b/app/javascript/gabsocial/pages/profile_page.js index 61dd6a79..2f07c9d4 100644 --- a/app/javascript/gabsocial/pages/profile_page.js +++ b/app/javascript/gabsocial/pages/profile_page.js @@ -20,6 +20,12 @@ class ProfilePage extends ImmutablePureComponent { } } + componentDidUpdate() { + if (!this.props.account) { + this.props.dispatch(fetchAccountByUsername(this.props.params.username)) + } + } + render() { const { account,