WordPress.org

Make WordPress Core

Ticket #23216: 23216-autosave.diff

File 23216-autosave.diff, 574 bytes (added by carldanley, 9 months ago)
  • wp-includes/js/autosave.js

     
    246246 
    247247function autosave_enable_buttons() { 
    248248        jQuery(document).trigger('autosave-enable-buttons'); 
    249         if ( ! wp.heartbeat.hasConnectionError() ) { 
     249        if ( ! wp.heartbeat || ! wp.heartbeat.hasConnectionError() ) { 
    250250                // delay that a bit to avoid some rare collisions while the DOM is being updated. 
    251251                setTimeout(function(){ 
    252252                        var parent = jQuery('#submitpost');