diff options
author | Dessalines <tyhou13@gmx.com> | 2019-12-08 12:23:11 -0800 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-12-08 12:23:11 -0800 |
commit | 13f8608e05cf6da1c6f4146680296d78e67aa88c (patch) | |
tree | 10440b7fa712f2708e07feff8528249feb1963ef /ui/src/components/user.tsx | |
parent | a6810da9922ccfe6cbd248b787b4c66774fc97eb (diff) |
Fix issue with user page reloading on resort.
- Fixes #361
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r-- | ui/src/components/user.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
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<any, UserState> { 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(); } |