From 808fb26b619bb858cd77010a7d42648e21f07f81 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 21 Jul 2008 07:14:24 -0400
Subject: [PATCH] #1485173: fixed empty body check

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

diff --git a/program/js/app.js b/program/js/app.js
index 657a45d..9682ada 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1889,9 +1889,9 @@
       }
 
     // check for empty body
-    if ((input_message.value == '' &&
-         (!window.tinyMCE || tinyMCE.get('compose-body').getContent() == '')) &&
-        !confirm(this.get_label('nobodywarning')))
+    if ((((!window.tinyMCE || !tinyMCE.get('compose-body')) && input_message.value == '')
+	|| (window.tinyMCE && tinyMCE.get('compose-body') && tinyMCE.get('compose-body').getContent() == ''))
+	&& !confirm(this.get_label('nobodywarning')))
       {
       input_message.focus();
       return false;

--
Gitblit v1.9.1