Skip to content

Commit 860f9fa

Browse files
author
Alexis Beingessner
committed
Ticket OscarGodson#233 - assuming save is auto is if _isPreviewDraft
1 parent d8d009d commit 860f9fa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/editor.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@
10241024
if (!self._canSave) {
10251025
return;
10261026
}
1027-
self.save(true, true);
1027+
self.save(true);
10281028
}, 100);
10291029

10301030
_syncTextarea = function () {
@@ -1057,7 +1057,7 @@
10571057
// manually save draft after import so there is no delay between the
10581058
// import and exporting in _syncTextarea. Without this, _syncTextarea
10591059
// will pull the saved data from localStorage which will be <=100ms old.
1060-
self.save(true, true);
1060+
self.save(true);
10611061
}
10621062

10631063
// Update the textarea on load and pull from drafts
@@ -1194,7 +1194,7 @@
11941194
}
11951195

11961196
// Save a preview draft since it might not be saved to the real file yet
1197-
self.save(true, true);
1197+
self.save(true);
11981198

11991199
// Add the generated draft HTML into the previewer
12001200
self.previewer.innerHTML = self.exportFile(null, 'html', true);
@@ -1396,7 +1396,8 @@
13961396
// Emit a private update event so it can't get accidentally removed
13971397
self.emit('__update');
13981398
}
1399-
if (_isAuto) {
1399+
1400+
if (_isAuto || _isPreviewDraft) {
14001401
this.emit('autosave');
14011402
}
14021403
else {

0 commit comments

Comments
 (0)