summaryrefslogtreecommitdiffstats
path: root/ui/src/components/user.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r--ui/src/components/user.tsx5
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();
}