Skip to content

Commit

Permalink
Fix issue with empty markdown content not nulling DB. Fixes #924
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Feb 6, 2023
1 parent 4eb9023 commit ea96a3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/components/common/markdown-textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ export class MarkdownTextArea extends Component<
}

contentChange() {
if (this.state.content) {
this.props.onContentChange?.(this.state.content);
}
// Coerces the undefineds to empty strings, for replacing in the DB
let content = this.state.content ? this.state.content : "";
this.props.onContentChange?.(content);
}

handleContentChange(i: MarkdownTextArea, event: any) {
Expand Down

0 comments on commit ea96a3a

Please sign in to comment.