Fix issue with user page reloading on resort.

- Fixes #361
pull/722/head
Dessalines 2019-12-08 12:23:11 -08:00
parent a6810da992
commit 13f8608e05
1 changed files with 4 additions and 1 deletions

View File

@ -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();
}