From: Dessalines Date: Sun, 8 Dec 2019 20:23:11 +0000 (-0800) Subject: Fix issue with user page reloading on resort. X-Git-Url: http://these/git/%22%7Burl%7D/%24%7Bargs.pageFn.prev%7D?a=commitdiff_plain;h=13f8608e05cf6da1c6f4146680296d78e67aa88c;p=lemmy.git Fix issue with user page reloading on resort. - Fixes #361 --- diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx index b90f8167..0aba995f 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(); }