From b70cf29aaecb41c4a41111cf492baac9526dc5c7 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Mon, 11 Dec 2017 22:37:38 -0800 Subject: [PATCH] Fixed: Another spurious save prompt --- app/scenes/Document/Document.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/scenes/Document/Document.js b/app/scenes/Document/Document.js index af96675b6..dc6efe6db 100644 --- a/app/scenes/Document/Document.js +++ b/app/scenes/Document/Document.js @@ -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 = () => {