From: Dessalines Date: Thu, 5 Nov 2020 23:41:21 +0000 (-0600) Subject: On component unmounting, unset the window iso data, to force a refresh. X-Git-Url: http://these/git/?a=commitdiff_plain;h=5bae84080478eae315aa6427736ace1dd4c04354;p=lemmy-ui.git On component unmounting, unset the window iso data, to force a refresh. --- diff --git a/src/shared/components/community.tsx b/src/shared/components/community.tsx index f430fe9..86d2c1c 100644 --- a/src/shared/components/community.tsx +++ b/src/shared/components/community.tsx @@ -138,6 +138,7 @@ export class Community extends Component { componentWillUnmount() { if (isBrowser()) { this.subscription.unsubscribe(); + window.isoData.path = undefined; } } diff --git a/src/shared/components/main.tsx b/src/shared/components/main.tsx index 689a4d9..5f7b777 100644 --- a/src/shared/components/main.tsx +++ b/src/shared/components/main.tsx @@ -162,6 +162,7 @@ export class Main extends Component { componentWillUnmount() { if (isBrowser()) { this.subscription.unsubscribe(); + window.isoData.path = undefined; } } diff --git a/src/shared/components/post.tsx b/src/shared/components/post.tsx index c963690..37bae27 100644 --- a/src/shared/components/post.tsx +++ b/src/shared/components/post.tsx @@ -131,6 +131,7 @@ export class Post extends Component { componentWillUnmount() { this.subscription.unsubscribe(); + window.isoData.path = undefined; } componentDidMount() {