From 8449e936f3a305f2c0f051b430fd187da81c3a98 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 01 Aug 2015 11:17:56 -0400
Subject: [PATCH] Fix removing signature when switching to identity with an empty sig in HTML mode (#1490470)

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

diff --git a/CHANGELOG b/CHANGELOG
index ebc7e85..8189efc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -34,6 +34,7 @@
 - Fix wrong positioning of message list header on page scroll in Webkit browsers (#1490035)
 - Fix some javascript errors in rare situations (#1490441)
 - Fix error when using back button after sending an email (#1490009)
+- Fix removing signature when switching to identity with an empty sig in HTML mode (#1490470)
 
 RELEASE 1.1.2
 -------------
diff --git a/program/js/editor.js b/program/js/editor.js
index abd800c..6446dc5 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -548,9 +548,7 @@
         }
       }
 
-      if (rcmail.env.signatures[id]) {
-        sigElem.innerHTML = rcmail.env.signatures[id].html;
-      }
+      sigElem.innerHTML = rcmail.env.signatures[id] ? rcmail.env.signatures[id].html : '';
     }
     else if (!rcmail.env.top_posting) {
       position_element = $(this.editor.getBody()).children().last();

--
Gitblit v1.9.1