From f7aaf23ce549935ab5252dd08eb81e1701a0f267 Mon Sep 17 00:00:00 2001 From: colemanw Date: Sun, 6 Jul 2014 17:12:21 +0100 Subject: [PATCH] Addendum to #3607 - protect against js errors --- js/crm.ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/crm.ajax.js b/js/crm.ajax.js index 5ca6a8907f..a3e9932e6e 100644 --- a/js/crm.ajax.js +++ b/js/crm.ajax.js @@ -215,7 +215,7 @@ }, _onError: function(data) { this.element.attr('data-unsaved-changes', 'false').trigger('crmAjaxError', data); - if (this.options.crmForm.autoClose && this.element.data('uiDialog')) { + if (this.options.crmForm && this.options.crmForm.autoClose && this.element.data('uiDialog')) { this.element.dialog('close'); } }, -- 2.25.1