From 4b30b6d764a28008ef1dfff06da43539e9efa1a1 Mon Sep 17 00:00:00 2001 From: ernestwisniewski Date: Sat, 11 Jul 2020 16:13:45 +0200 Subject: Redirect error on create_post page for not logged in users. #937 (#938) --- ui/src/components/post-form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 30527510..e5efeaac 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -166,7 +166,7 @@ export class PostForm extends Component { componentWillUnmount() { this.subscription.unsubscribe(); - this.choices.destroy(); + this.choices && this.choices.destroy(); window.onbeforeunload = null; } -- cgit v1.2.3