Fixed: Spurious save prompts

This commit is contained in:
Tom Moor
2017-12-06 08:40:43 -08:00
parent 64c2624479
commit 7b9fa9f4a7
2 changed files with 2 additions and 4 deletions

View File

@@ -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;
}
};

View File

@@ -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);
};