Merge pull request #353 from jorilallo/jori/empty-fix

Fixes for empty document
This commit is contained in:
Jori Lallo
2017-10-22 22:29:23 -07:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ type KeyData = {
onImageUploadStop: props.onImageUploadStop,
});
if (props.text) {
if (props.text.trim().length) {
this.state = { state: Markdown.deserialize(props.text) };
} else {
this.state = { state: Plain.deserialize('') };