]> Untitled Git - lemmy-ui.git/commitdiff
Fix comment box closing. Fixes #904 (#914)
authorDessalines <dessalines@users.noreply.github.com>
Fri, 3 Feb 2023 02:26:18 +0000 (21:26 -0500)
committerGitHub <noreply@github.com>
Fri, 3 Feb 2023 02:26:18 +0000 (21:26 -0500)
src/shared/components/comment/comment-form.tsx

index 40650db92e5a419501ad91fc3a7609f7bfabb0c8..9c29381da1c6328757ec27f237dc688a638a2b4d 100644 (file)
@@ -184,7 +184,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
         let data = wsJsonToRes<CommentResponse>(msg);
 
         // This only finishes this form, if the randomly generated form_id matches the one received
-        if (this.state.formId == data.form_id) {
+        if (this.state.formId && this.state.formId == data.form_id) {
           this.setState({ finished: true });
 
           // Necessary because it broke tribute for some reason