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; }