summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorernestwisniewski <ernestwisniewski2@gmail.com>2020-07-11 16:13:45 +0200
committerGitHub <noreply@github.com>2020-07-11 10:13:45 -0400
commit4b30b6d764a28008ef1dfff06da43539e9efa1a1 (patch)
tree7f92dc497490bdaab0f0f5385ddb570e33fc38b3
parentcb7733937005ecdd6cde00314ce151cce8c2d366 (diff)
Redirect error on create_post page for not logged in users. #937 (#938)
-rw-r--r--ui/src/components/post-form.tsx2
1 files changed, 1 insertions, 1 deletions
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<PostFormProps, PostFormState> {
componentWillUnmount() {
this.subscription.unsubscribe();
- this.choices.destroy();
+ this.choices && this.choices.destroy();
window.onbeforeunload = null;
}