Fixes #652 - Autosave should not trigger before anything is written
This commit is contained in:
@@ -187,6 +187,9 @@ class DocumentScene extends React.Component<Props> {
|
|||||||
if (!document) return;
|
if (!document) return;
|
||||||
if (document.text.trim() === text.trim()) return;
|
if (document.text.trim() === text.trim()) return;
|
||||||
document.updateData({ text }, true);
|
document.updateData({ text }, true);
|
||||||
|
|
||||||
|
// prevent autosave before anything has been written
|
||||||
|
if (!document.title && !document.id) return;
|
||||||
this.autosave();
|
this.autosave();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user