Fixed: Another spurious save prompt

This commit is contained in:
Tom Moor committed 2017-12-11 22:37:38 -08:00
1 parent 5900fa1fbb
commit b70cf29aae
1 file changed
+4 -3
+4 -3
View File
@@ -183,9 +183,10 @@ class DocumentScene extends Component {
};
onChange = text => {
if (!this.document) return;
if (this.document.text === text) return;
this.document.updateData({ text }, true);
let document = this.document;
if (!document) return;
if (document.text.trim() === text.trim()) return;
document.updateData({ text }, true);
};
onDiscard = () => {