From: ernestwisniewski Date: Sat, 11 Jul 2020 14:13:45 +0000 (+0200) Subject: Redirect error on create_post page for not logged in users. #937 (#938) X-Git-Url: http://these/git/%7B%24%7B%60data:application/%22%7Burl%7D/%7Bthis.state.url%7D?a=commitdiff_plain;h=4b30b6d764a28008ef1dfff06da43539e9efa1a1;p=lemmy.git Redirect error on create_post page for not logged in users. #937 (#938) --- 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; }