From c2da4fb85bda3cd32b53167873baa4d3e7e80079 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 8 Dec 2019 12:23:11 -0800 Subject: [PATCH] Fix issue with user page reloading on resort. - Fixes #361 --- ui/src/components/user.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx index b90f816..0aba995 100644 --- a/ui/src/components/user.tsx +++ b/ui/src/components/user.tsx @@ -180,7 +180,10 @@ export class User extends Component { componentDidUpdate(lastProps: any, _lastState: UserState, _snapshot: any) { // Necessary if you are on a post and you click another post (same route) - if (lastProps.location.pathname !== lastProps.history.location.pathname) { + if ( + lastProps.location.pathname.split('/')[2] !== + lastProps.history.location.pathname.split('/')[2] + ) { // Couldnt get a refresh working. This does for now. location.reload(); }