WordPress.org

Make WordPress Core

Ticket #36157: 36157.patch

File 36157.patch, 620 bytes (added by atimmer, 5 years ago)
  • src/wp-admin/js/post.js

     
    147147}).on( 'after-autosave.update-post-slug', function() {
    148148        // Create slug area only if not already there
    149149        // and the title field was not focused (user was not typing a title) when autosave ran
    150         if ( ! $('#edit-slug-box > *').length && ! titleHasFocus ) {
     150        if ( 0 !== $('#edit-slug-box > *').length && ! titleHasFocus ) {
    151151                $.post( ajaxurl, {
    152152                                action: 'sample-permalink',
    153153                                post_id: $('#post_ID').val(),