Addendum to #3607 - protect against js errors
authorcolemanw <coleman@civicrm.org>
Sun, 6 Jul 2014 16:12:21 +0000 (17:12 +0100)
committercolemanw <coleman@civicrm.org>
Sun, 6 Jul 2014 16:12:21 +0000 (17:12 +0100)
js/crm.ajax.js

index 5ca6a8907fbe89f9f3c2d628a68a51602722eb9b..a3e9932e6e0ebd4c98f2ee77022cba9e40117f52 100644 (file)
     },
     _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');
       }
     },