From: colemanw Date: Sun, 6 Jul 2014 16:12:21 +0000 (+0100) Subject: Addendum to #3607 - protect against js errors X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f7aaf23ce549935ab5252dd08eb81e1701a0f267;p=civicrm-core.git Addendum to #3607 - protect against js errors --- 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'); } },