WordPress.org

Make WordPress Core

Ticket #18227: autosave.dev.js.patch

File autosave.dev.js.patch, 687 bytes (added by MarcusPope, 7 years ago)

Improved patch recommendation by Marcus Pope

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

    RUNAS: diff -r72:73 wp-includes\js\autosave.dev.js
     
    256256                post_data["post_name"] = jQuery('#post_name').val();
    257257
    258258        // Nothing to save or no change.
    259         if ( ( post_data["post_title"].length == 0 && post_data["content"].length == 0 ) || post_data["post_title"] + post_data["content"] == autosaveLast ) {
     259        if ( (!post_data["post_title"] && !post_data["content"]) || post_data["post_title"] + post_data["content"] == autosaveLast ) {
    260260                doAutoSave = false;
    261261        }
    262262