Fixed: Spurious save prompts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user