WordPress.org

Make WordPress Core

Ticket #36742: 36742.3.diff

File 36742.3.diff, 607 bytes (added by rachelbaker, 4 years ago)

Add check that res.responses is not undefined to prevent console error

  • src/wp-includes/js/wp-lists.js

     
    297297                        res = wpAjax.parseAjaxResponse(r, s.response, s.element);
    298298                        rres = r;
    299299
    300                         if ( 'undefined' !== typeof res.responses[0].supplemental.comment_link ) {
     300                        if ( 'undefined' !== typeof res.responses && 'undefined' !== typeof res.responses[0].supplemental.comment_link ) {
    301301                                var submittedOn = element.find( '.submitted-on' ),
    302302                                        commentLink = submittedOn.find( 'a' );
    303303