mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-24 18:15:17 +00:00
parent
a6810da992
commit
13f8608e05
5
ui/src/components/user.tsx
vendored
5
ui/src/components/user.tsx
vendored
|
@ -180,7 +180,10 @@ export class User extends Component<any, UserState> {
|
||||||
|
|
||||||
componentDidUpdate(lastProps: any, _lastState: UserState, _snapshot: any) {
|
componentDidUpdate(lastProps: any, _lastState: UserState, _snapshot: any) {
|
||||||
// Necessary if you are on a post and you click another post (same route)
|
// 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.
|
// Couldnt get a refresh working. This does for now.
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue