mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
* Fix issue with empty markdown content not nulling DB. Fixes #924 * Better syntax
This commit is contained in:
parent
b0755bc010
commit
deffaf1ee0
1 changed files with 3 additions and 3 deletions
|
@ -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.props.onContentChange?.(content);
|
||||
}
|
||||
|
||||
handleContentChange(i: MarkdownTextArea, event: any) {
|
||||
|
|
Loading…
Reference in a new issue