mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 23:43:28 +00:00
* Fix issue with empty markdown content not nulling DB. Fixes #924 * Better syntax
This commit is contained in:
parent
b0755bc010
commit
deffaf1ee0
|
@ -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