From 7e55ca8f394f256aeaca809b08bf2985938f29f9 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 26 May 2018 18:16:07 -0700 Subject: [PATCH] Fixes #652 - Autosave should not trigger before anything is written --- app/scenes/Document/Document.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/scenes/Document/Document.js b/app/scenes/Document/Document.js index 534f04c7b..ae809986e 100644 --- a/app/scenes/Document/Document.js +++ b/app/scenes/Document/Document.js @@ -187,6 +187,9 @@ class DocumentScene extends React.Component { if (!document) return; if (document.text.trim() === text.trim()) return; document.updateData({ text }, true); + + // prevent autosave before anything has been written + if (!document.title && !document.id) return; this.autosave(); };