Fix comment box closing. Fixes #904

This commit is contained in:
Dessalines 2023-02-02 21:11:35 -05:00
parent 87c30705ef
commit 097e4cea0a

View file

@ -184,7 +184,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
let data = wsJsonToRes<CommentResponse>(msg); let data = wsJsonToRes<CommentResponse>(msg);
// This only finishes this form, if the randomly generated form_id matches the one received // 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 }); this.setState({ finished: true });
// Necessary because it broke tribute for some reason // Necessary because it broke tribute for some reason