From 4ff38dfd2ef496768c570302d3dfd7ff3e1b3e71 Mon Sep 17 00:00:00 2001
From: Giovane <giovaneliberato@gmail.com>
Date: Mon, 30 Nov 2015 14:45:11 -0200
Subject: Check if the discardMail method is define before apply the default
 implementation.  #512

---
 web-ui/app/js/mixins/with_mail_edit_base.js | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'web-ui/app/js')

diff --git a/web-ui/app/js/mixins/with_mail_edit_base.js b/web-ui/app/js/mixins/with_mail_edit_base.js
index 36d5980f..a1fa6b09 100644
--- a/web-ui/app/js/mixins/with_mail_edit_base.js
+++ b/web-ui/app/js/mixins/with_mail_edit_base.js
@@ -216,7 +216,9 @@ define(
       };
 
       this.before('initialize', function () {
+          if (!this.discardDraft){
             this.discardDraft = function () {};
+          }
       });
 
       this.after('initialize', function () {
-- 
cgit v1.2.3