Summary.js cleanup
authorColeman Watts <coleman@civicrm.org>
Wed, 20 Aug 2014 14:36:39 +0000 (15:36 +0100)
committerColeman Watts <coleman@civicrm.org>
Wed, 20 Aug 2014 14:36:39 +0000 (15:36 +0100)
templates/CRM/Contact/Page/View/Summary.js

index 8845fdf334d6bcb52862fad47a7aed6fdd1e3d2f..4ee08665810babe10a2bf9f93a61476d41cbbf6d 100644 (file)
@@ -92,7 +92,7 @@
         CRM.status(ts('Saved'));
       }
       // Update changelog tab and contact footer
-      if (response.changeLog.count) {
+      if (response.changeLog && response.changeLog.count) {
         CRM.tabHeader.updateCount('#tab_log', response.changeLog.count);
       }
       $("#crm-record-log").replaceWith(response.changeLog.markup);
     $('.crm-inline-edit.form form').unblock();
   }
 
-  $('document').ready(function() {
+  $(function() {
     // don't perform inline edit during print mode
     if (CRM.summaryPrint.mode) {
       $('div').removeClass('crm-inline-edit');