fix: check if email_template is set

Prevents error on empty email_template.
This commit is contained in:
barredterra 2021-01-27 18:59:47 +01:00 committed by Suraj Shetty
parent 90819667cf
commit d31ed278d6

View file

@ -271,6 +271,9 @@ frappe.views.CommunicationComposer = Class.extend({
this.dialog.fields_dict["email_template"].df.onchange = () => {
var email_template = me.dialog.fields_dict.email_template.get_value();
if (email_template === '') {
return;
}
var prepend_reply = function(reply) {
if(me.reply_added===email_template) {