WordPress.org

Make WordPress Core

Ticket #16928: 16928.diff

File 16928.diff, 731 bytes (added by benbalter, 4 years ago)

initial pass, first patch, go easy

  • wp-includes/js/autosave.dev.js

     
    8686        var res = wpAjax.parseAjaxResponse(response, 'autosave'), message = '', postID, sup, url; 
    8787 
    8888        if ( res && res.responses && res.responses.length ) { 
    89                 message = res.responses[0].data; // The saved message or error. 
     89                message = res.responses[0].data || ( res.responses[0].errors.length && res.responses[0].errors[0].message ); // The saved message or error.              
    9090                // someone else is editing: disable autosave, set errors 
    9191                if ( res.responses[0].supplemental ) { 
    9292                        sup = res.responses[0].supplemental;