mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 22:31: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() {
|
contentChange() {
|
||||||
if (this.state.content) {
|
// Coerces the undefineds to empty strings, for replacing in the DB
|
||||||
this.props.onContentChange?.(this.state.content);
|
let content = this.state.content ?? "";
|
||||||
}
|
this.props.onContentChange?.(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleContentChange(i: MarkdownTextArea, event: any) {
|
handleContentChange(i: MarkdownTextArea, event: any) {
|
||||||
|
|
Loading…
Reference in a new issue