From 5bae84080478eae315aa6427736ace1dd4c04354 Mon Sep 17 00:00:00 2001 From: Dessalines <tyhou13@gmx.com> 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 f430fe9..86d2c1c 100644 --- a/src/shared/components/community.tsx +++ b/src/shared/components/community.tsx @@ -138,6 +138,7 @@ export class Community extends Component<any, State> { 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<any, MainState> { 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<any, PostState> { componentWillUnmount() { this.subscription.unsubscribe(); + window.isoData.path = undefined; } componentDidMount() { -- 2.44.1