diff --git a/app/components/Editor/Editor.js b/app/components/Editor/Editor.js index a95079ff7..5edfd4d31 100644 --- a/app/components/Editor/Editor.js +++ b/app/components/Editor/Editor.js @@ -76,10 +76,7 @@ class MarkdownEditor extends Component { onChange = (change: Change) => { if (this.editorValue !== change.value) { - const text = Markdown.serialize(change.value); - if (text !== this.props.text) { - this.props.onChange(text); - } + this.props.onChange(Markdown.serialize(change.value)); this.editorValue = change.value; } }; diff --git a/app/scenes/Document/Document.js b/app/scenes/Document/Document.js index f116a909c..0f2d3a21f 100644 --- a/app/scenes/Document/Document.js +++ b/app/scenes/Document/Document.js @@ -183,6 +183,7 @@ class DocumentScene extends Component { onChange = text => { if (!this.document) return; + if (this.document.text === text) return; this.document.updateData({ text }, true); };