From 7d3d62e5ed98cfed8b46bbb1c620142f190d2c03 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 12 May 2014 11:56:07 -0400
Subject: [PATCH] Fix unintentional draft autosave request if autosave is disabled (#1489882)

---
 program/js/app.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 042ebb7..9aa0942 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3703,12 +3703,13 @@
 
   this.auto_save_start = function()
   {
-    if (this.env.draft_autosave)
+    if (this.env.draft_autosave) {
       this.draft_autosave_submit = false;
       this.save_timer = setTimeout(function(){
           ref.draft_autosave_submit = true;  // set auto-saved flag (#1489789)
           ref.command("savedraft");
       }, this.env.draft_autosave * 1000);
+    }
 
     // save compose form content to local storage every 5 seconds
     if (!this.local_save_timer && window.localStorage) {

--
Gitblit v1.9.1