]> Untitled Git - lemmy.git/commitdiff
Redirect error on create_post page for not logged in users. #937 (#938)
authorernestwisniewski <ernestwisniewski2@gmail.com>
Sat, 11 Jul 2020 14:13:45 +0000 (16:13 +0200)
committerGitHub <noreply@github.com>
Sat, 11 Jul 2020 14:13:45 +0000 (10:13 -0400)
ui/src/components/post-form.tsx

index 3052751051f1a4b50dae3385457954cc6a7ba77d..e5efeaac508e5e8d439878dbeb410a7e4ec594d6 100644 (file)
@@ -166,7 +166,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
 
   componentWillUnmount() {
     this.subscription.unsubscribe();
-    this.choices.destroy();
+    this.choices && this.choices.destroy();
     window.onbeforeunload = null;
   }