From 5bae84080478eae315aa6427736ace1dd4c04354 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 5 Nov 2020 17:41:21 -0600 Subject: [PATCH] On component unmounting, unset the window iso data, to force a refresh. --- src/shared/components/community.tsx | 1 + src/shared/components/main.tsx | 1 + src/shared/components/post.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/src/shared/components/community.tsx b/src/shared/components/community.tsx index f430fe95..86d2c1cc 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 689a4d9f..5f7b7776 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 c9636902..37bae27d 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() {